% Function: predict the TWSC past the GRACE period as described in Section 4.2.1.3 (see the paper).
% 
%  For better understanding these codes, please see the comments as noted
%  in Run_Ama_LS_test.m/Run_Ama_LS_test.m first.
% 
%  Here, the PCA, ICA, LS, and MLR methods are applied to a study region
% --------------------------------------------------------------------------
% AUTHOR:
%   Fupeng Li
%   SGG,Wuhan University,China
%   Email:fpli@whu.edu.cn
% %  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % ICA, PCA, and LS of TWSC in Amazon basin
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
% load /Users/mac/Documents/MATLAB/data/MASCON/JPL_MASCON/JPL_interpo.mat
load CSR_interpo.mat
[yv,xv]=textread('amazon_new.bln','%f %f');
s=18;
mode=6;
[mm,nn,t1]=size(grid_data_grace);
for n1=1:t1   
  k=1;
  k1=1;
  for i=82:113
  for j=276:312
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_TWS(k,n1)=grid_data_grace(i,j,n1);
    long(k)=lon((i-1)*180+j);
    lat(k)=la((i-1)*180+j);
    k=k+1;
    else
    long1(k1,1)=lon((i-1)*180+j);
    lat1(k1,1)=la((i-1)*180+j);
    a1_TWS1(k1,1)=0;
    k1=k1+1;
    end
  end
  end
  n1
end
long=long';
lat=lat';
[B_TWS,E_TWS,C_TWS,S1_TWS,T1_TWS] =  jadeR(a1_TWS,mode);
T_TWS=B_TWS*a1_TWS;
S_TWS=a1_TWS*T_TWS'*inv(T_TWS*T_TWS');
T_TWS=T_TWS';
A=inv(S_TWS'*S_TWS)*S_TWS'*C_TWS*S_TWS;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_TWS(i,1)=A(i,i)/A_SUM*100;
end
time1=time;
for i=1:mode
    [LS_output]=LS(time1,T_TWS(:,i),s);
    LS_TWS(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time1,T1_TWS(:,i),s);
    LS1_TWS(:,:,i)=LS_output;
end
% %  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Read GLDAS in Amazon basin
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % load /Users/mac/Documents/MATLAB/data/Hydrology_model/GLDAS_GRID/1979_2018_GLDAS.mat
% % [yv,xv]=textread('/Users/mac/Desktop/Prediction/ICA/data/ama/amazon_new.bln','%f %f');
% % grid_data_grace=grid_data_grace(:,:,268:468);
% % [mm,nn,tg]=size(grid_data_grace);
% % for ng=1:tg   
% %   k=1;
% %   k1=1;
% %   for i=82:113
% %   for j=276:312
% %     lon((i-1)*180+j)=j-0.5;
% %     la((i-1)*180+j)=90.5-i;
% %     in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
% %     if in==1;
% %     a1_GLDAS(k,ng)=grid_data_grace(i,j,ng);
% %     long(k)=lon((i-1)*180+j);
% %     lat(k)=la((i-1)*180+j);
% %     k=k+1;
% %     end
% %   end
% %   end
% %   ng
% % end
% % % %  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % Read CPC in Amazon basin
% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% load /Users/mac/Documents/MATLAB/data/Hydrology_model/CPC/194801_201903_CPC_TWS.mat
% [yv,xv]=textread('/Users/mac/Desktop/Prediction/ICA/data/ama/amazon_new.bln','%f %f');
% [mm,nn,tc]=size(grid_data_grace);
% for nc=1:tc   
%   k=1;
%   k1=1;
%   for i=82:113
%   for j=276:312
%     lon((i-1)*180+j)=j-0.5;
%     la((i-1)*180+j)=90.5-i;
%     in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
%     if in==1;
%     a1_CPC_S(k,nc)=grid_data_grace(i,j,nc);
%     long(k)=lon((i-1)*180+j);
%     lat(k)=la((i-1)*180+j);
%     k=k+1;
%     end
%   end
%   end
%   nc
% end
% % % % % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % % % % % ICA, PCA, and LS of SST in the South Atlantic
% % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load 200201_201903_SST_NOAA.mat
[yv1,xv1]=textread('SAtlantic1.bln','%f %f');
[yv2,xv2]=textread('SAtlantic2.bln','%f %f');
[mm,nn,t1]=size(grid_data_grace);
k1=0;
for n2=1:t1
  k=1;
   n2
  for i=75:150
    for j=285:360  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv1,yv1);
    if in==1;
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    a1_SAt(k,n2)=grid_data_grace(i,j,n2);
    long_SAt(k,1)=lon((i-1)*180+j);
    lat_SAt(k,1)=la((i-1)*180+j);
    k=k+1;
    end
    end
    for j=1:30  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv2,yv2);
    if in==1;
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    a1_SAt(k,n2)=grid_data_grace(i,j,n2);
    long_SAt(k,1)=lon((i-1)*180+j);
    lat_SAt(k,1)=la((i-1)*180+j);
    k=k+1;
    end
    end
  end
end
[p t1]=size(a1_SAt);
for i=1:p
    a2(i,1)=sum(a1_SAt(i,:))/t1;
    for j=1:t1
        a1_SAt(i,j)=a1_SAt(i,j)-a2(i,1);
    end
end
[B_SAt,E_SAt,C_SAt,S1_SAt,T1_SAt] =  jadeR(a1_SAt,mode);
T_SAt=B_SAt*a1_SAt;
S_SAt=a1_SAt*T_SAt'*inv(T_SAt*T_SAt');
T_SAt=T_SAt';
A=inv(S_SAt'*S_SAt)*S_SAt'*C_SAt*S_SAt;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_SAt(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_SAt(:,i),s);
    LS_SAt(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_SAt(:,i),s);
    LS1_SAt(:,:,i)=LS_output;
end
% % % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % % ICA, PCA, and LS of SST in the North Atlantic
% % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv,xv]=textread('NAtlantic.bln','%f %f');
for n3=1:t1
  k=1;
  for i=30:105
  for j=260:360  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_NAt(k,n3)=grid_data_grace(i,j,n3);
    long_NAt(k,1)=lon((i-1)*180+j);
    lat_NAt(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
   n3
end
[p,t1]=size(a1_NAt);
for i=1:p
    a2(i,1)=sum(a1_NAt(i,:))/t1;
    for j=1:t1
        a1_NAt(i,j)=a1_NAt(i,j)-a2(i,1);
    end
end
[B_NAt,E_NAt,C_NAt,S1_NAt,T1_NAt] =  jadeR(a1_NAt,mode);
T_NAt=B_NAt*a1_NAt;
S_NAt=a1_NAt*T_NAt'*inv(T_NAt*T_NAt');
T_NAt=T_NAt';
A=inv(S_NAt'*S_NAt)*S_NAt'*C_NAt*S_NAt;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_NAt(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_NAt(:,i),s);
    LS_NAt(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_NAt(:,i),s);
    LS1_NAt(:,:,i)=LS_output;
end
% % % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % % % ICA, PCA, and LS of SST in the NNorth Atlantic
% % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv1,xv1]=textread('NNAtlantic1.bln','%f %f');
[yv2,xv2]=textread('NNAtlantic2.bln','%f %f');
for n4=1:t1
  k=1;
   n4
  for i=30:60
    for j=300:360  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv1,yv1);
    if in==1;
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    a1_NNAt(k,n4)=grid_data_grace(i,j,n4);
    long_NNAt(k,1)=lon((i-1)*180+j);
    lat_NNAt(k,1)=la((i-1)*180+j);
    k=k+1;
    end
    end
    for j=1:15  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv2,yv2);
    if in==1;
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    a1_NNAt(k,n4)=grid_data_grace(i,j,n4);
    long_NNAt(k,1)=lon((i-1)*180+j);
    lat_NNAt(k,1)=la((i-1)*180+j);
    k=k+1;
    end
    end
  end
end
[p t1]=size(a1_NNAt);
for i=1:p
    a2(i,1)=sum(a1_NNAt(i,:))/t1;
    for j=1:t1
        a1_NNAt(i,j)=a1_NNAt(i,j)-a2(i,1);
    end
end
[B_NNAt,E_NNAt,C_NNAt,S1_NNAt,T1_NNAt] =  jadeR(a1_NNAt,mode);
T_NNAt=B_NNAt*a1_NNAt;
S_NNAt=a1_NNAt*T_NNAt'*inv(T_NNAt*T_NNAt');
T_NNAt=T_NNAt';
A=inv(S_NNAt'*S_NNAt)*S_NNAt'*C_NNAt*S_NNAt;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_NNAt(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_NNAt(:,i),s);
    LS_NNAt(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_NNAt(:,i),s);
    LS1_NNAt(:,:,i)=LS_output;
end
% % % % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % % ICA, PCA, and LS of SST in the South Pacific
% % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv,xv]=textread('SPacific.bln','%f %f');
for n5=1:t1
  k=1;
  for i=60:150
  for j=179:300  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_SPa(k,n5)=grid_data_grace(i,j,n5);
    long_SPa(k,1)=lon((i-1)*180+j);
    lat_SPa(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
   n5
end
[p,t1]=size(a1_SPa);
for i=1:p
    a2(i,1)=sum(a1_SPa(i,:))/t1;
    for j=1:t1
        a1_SPa(i,j)=a1_SPa(i,j)-a2(i,1);
    end
end
[B_SPa,E_SPa,C_SPa,S1_SPa,T1_SPa] =  jadeR(a1_SPa,mode);
T_SPa=B_SPa*a1_SPa;
S_SPa=a1_SPa*T_SPa'*inv(T_SPa*T_SPa');
T_SPa=T_SPa';
A=inv(S_SPa'*S_SPa)*S_SPa'*C_SPa*S_SPa;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_SPa(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_SPa(:,i),s);
    LS_SPa(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_SPa(:,i),s);
    LS1_SPa(:,:,i)=LS_output;
end
% % % % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % % ICA, PCA, and LS of SST in the North Pacific
% % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv,xv]=textread('NPacific.bln','%f %f');
for n6=1:t1
  k=1;
  for i=45:90
  for j=179:300  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_NPa(k,n6)=grid_data_grace(i,j,n6);
    long_NPa(k,1)=lon((i-1)*180+j);
    lat_NPa(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
   n6
end
[p,t1]=size(a1_NPa);
for i=1:p
    a2(i,1)=sum(a1_NPa(i,:))/t1;
    for j=1:t1
        a1_NPa(i,j)=a1_NPa(i,j)-a2(i,1);
    end
end
[B_NPa,E_NPa,C_NPa,S1_NPa,T1_NPa] =  jadeR(a1_NPa,mode);
T_NPa=B_NPa*a1_NPa;
S_NPa=a1_NPa*T_NPa'*inv(T_NPa*T_NPa');
T_NPa=T_NPa';
A=inv(S_NPa'*S_NPa)*S_NPa'*C_NPa*S_NPa;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_NPa(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_NPa(:,i),s);
    LS_NPa(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_NPa(:,i),s);
    LS1_NPa(:,:,i)=LS_output;
end
% % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % % ICA, PCA, and LS of SST in the NGBsea
% % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv1,xv1]=textread('NGBsea1.bln','%f %f');
[yv2,xv2]=textread('NGBsea2.bln','%f %f');
for n7=1:t1
  k=1;
   n7
  for i=1:60
    for j=330:360  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv1,yv1);
    if in==1;
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    a1_NGB(k,n7)=grid_data_grace(i,j,n7);
    long_NGB(k,1)=lon((i-1)*180+j);
    lat_NGB(k,1)=la((i-1)*180+j);
    k=k+1;
    end
    end
    for j=1:120  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv2,yv2);
    if in==1;
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    a1_NGB(k,n7)=grid_data_grace(i,j,n7);
    long_NGB(k,1)=lon((i-1)*180+j);
    lat_NGB(k,1)=la((i-1)*180+j);
    k=k+1;
    end
    end
  end
end
[p t1]=size(a1_NGB);
for i=1:p
    a2(i,1)=sum(a1_NGB(i,:))/t1;
    for j=1:t1
        a1_NGB(i,j)=a1_NGB(i,j)-a2(i,1);
    end
end
[B_NGB,E_NGB,C_NGB,S1_NGB,T1_NGB] =  jadeR(a1_NGB,mode);
T_NGB=B_NGB*a1_NGB;
S_NGB=a1_NGB*T_NGB'*inv(T_NGB*T_NGB');
T_NGB=T_NGB';
A=inv(S_NGB'*S_NGB)*S_NGB'*C_NGB*S_NGB;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_NGB(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_NGB(:,i),s);
    LS_NGB(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_NGB(:,i),s);
    LS1_NGB(:,:,i)=LS_output;
end
% % % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % ICA, PCA, and LS of SST in the Indian Ocean
% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv,xv]=textread('Indian.bln','%f %f');
for n8=1:t1
  k=1;
  for i=60:150
  for j=10:130  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_Ind(k,n8)=grid_data_grace(i,j,n8);
    long_Ind(k,1)=lon((i-1)*180+j);
    lat_Ind(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
   n8
end
[p,t1]=size(a1_Ind);
for i=1:p
    a2(i,1)=sum(a1_Ind(i,:))/t1;
    for j=1:t1
        a1_Ind(i,j)=a1_Ind(i,j)-a2(i,1);
    end
end
[B_Ind,E_Ind,C_Ind,S1_Ind,T1_Ind] =  jadeR(a1_Ind,mode);
T_Ind=B_Ind*a1_Ind;
S_Ind=a1_Ind*T_Ind'*inv(T_Ind*T_Ind');
T_Ind=T_Ind';
A=inv(S_Ind'*S_Ind)*S_Ind'*C_Ind*S_Ind;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_Ind(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_Ind(:,i),s);
    LS_Ind(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_Ind(:,i),s);
    LS1_Ind(:,:,i)=LS_output;
end
% % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % % ICA, PCA, and LS of SST in the Mediterranean
% % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv1,xv1]=textread('Mediterranean1.bln','%f %f');
[yv2,xv2]=textread('Mediterranean2.bln','%f %f');
for n9=1:t1
  k=1;
   n9
  for i=40:65
    for j=340:360  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv1,yv1);
    if in==1;
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    a1_Med(k,n9)=grid_data_grace(i,j,n9);
    long_Med(k,1)=lon((i-1)*180+j);
    lat_Med(k,1)=la((i-1)*180+j);
    k=k+1;
    end
    end
    for j=1:45
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv2,yv2);
    if in==1;
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    a1_Med(k,n9)=grid_data_grace(i,j,n9);
    long_Med(k,1)=lon((i-1)*180+j);
    lat_Med(k,1)=la((i-1)*180+j);
    k=k+1;
    end
    end
  end
end
[p t1]=size(a1_Med);
for i=1:p
    a2(i,1)=sum(a1_Med(i,:))/t1;
    for j=1:t1
        a1_Med(i,j)=a1_Med(i,j)-a2(i,1);
    end
end
[B_Med,E_Med,C_Med,S1_Med,T1_Med] =  jadeR(a1_Med,mode);
T_Med=B_Med*a1_Med;
S_Med=a1_Med*T_Med'*inv(T_Med*T_Med');
T_Med=T_Med';
A=inv(S_Med'*S_Med)*S_Med'*C_Med*S_Med;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_Med(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_Med(:,i),s);
    LS_Med(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_Med(:,i),s);
    LS1_Med(:,:,i)=LS_output;
end
% % % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % ICA, PCA, and LS of SST in the Blacksea
% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv,xv]=textread('Blacksea.bln','%f %f');
for n10=1:t1
  k=1;
  for i=40:60
  for j=20:50  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_Black(k,n10)=grid_data_grace(i,j,n10);
    long_Black(k,1)=lon((i-1)*180+j);
    lat_Black(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
   n10
end
[p,t1]=size(a1_Black);
for i=1:p
    a2(i,1)=sum(a1_Black(i,:))/t1;
    for j=1:t1
        a1_Black(i,j)=a1_Black(i,j)-a2(i,1);
    end
end
[B_Black,E_Black,C_Black,S1_Black,T1_Black] =  jadeR(a1_Black,mode);
T_Black=B_Black*a1_Black;
S_Black=a1_Black*T_Black'*inv(T_Black*T_Black');
T_Black=T_Black';
A=inv(S_Black'*S_Black)*S_Black'*C_Black*S_Black;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_Black(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_Black(:,i),s);
    LS_Black(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_Black(:,i),s);
    LS1_Black(:,:,i)=LS_output;
end
% % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % ICA, PCA, and LS of SST in the Baltic
% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv,xv]=textread('Baltic.bln','%f %f');
for n11=1:t1
  k=1;
  for i=15:45
  for j=1:35  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_Baltic(k,n11)=grid_data_grace(i,j,n11);
    long_Baltic(k,1)=lon((i-1)*180+j);
    lat_Baltic(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
   n11
end
[p,t1]=size(a1_Baltic);
for i=1:p
    a2(i,1)=sum(a1_Baltic(i,:))/t1;
    for j=1:t1
        a1_Baltic(i,j)=a1_Baltic(i,j)-a2(i,1);
    end
end
[B_Baltic,E_Baltic,C_Baltic,S1_Baltic,T1_Baltic] =  jadeR(a1_Baltic,mode);
T_Baltic=B_Baltic*a1_Baltic;
S_Baltic=a1_Baltic*T_Baltic'*inv(T_Baltic*T_Baltic');
T_Baltic=T_Baltic';
A=inv(S_Baltic'*S_Baltic)*S_Baltic'*C_Baltic*S_Baltic;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_Baltic(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_Baltic(:,i),s);
    LS_Baltic(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_Baltic(:,i),s);
    LS1_Baltic(:,:,i)=LS_output;
end
% % % %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % ICA, PCA, and LS of SST in the Hudson
% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[yv,xv]=textread('Hudson.bln','%f %f');
for n12=1:t1
  k=1;
  for i=15:45
  for j=260:290  
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_Hudson(k,n12)=grid_data_grace(i,j,n12);
    long_Hudson(k,1)=lon((i-1)*180+j);
    lat_Hudson(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
   n12
end
[p,t1]=size(a1_Hudson);
for i=1:p
    a2(i,1)=sum(a1_Hudson(i,:))/t1;
    for j=1:t1
        a1_Hudson(i,j)=a1_Hudson(i,j)-a2(i,1);
    end
end
[B_Hudson,E_Hudson,C_Hudson,S1_Hudson,T1_Hudson] =  jadeR(a1_Hudson,mode);
T_Hudson=B_Hudson*a1_Hudson;
S_Hudson=a1_Hudson*T_Hudson'*inv(T_Hudson*T_Hudson');
T_Hudson=T_Hudson';
A=inv(S_Hudson'*S_Hudson)*S_Hudson'*C_Hudson*S_Hudson;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_Hudson(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_Hudson(:,i),s);
    LS_Hudson(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_Hudson(:,i),s);
    LS1_Hudson(:,:,i)=LS_output;
end
% %%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % ICA, PCA, and LS of Temperature in Amazon basin
% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load 200201_201903_temp.mat
[yv,xv]=textread('amazon_new.bln','%f %f');
s=18;
[mm,nn,t1]=size(grid_data_grace);
for n13=1:t1   
  k=1;
  for i=82:113
  for j=276:312
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_TEM(k,n13)=grid_data_grace(i,j,n13);
    long(k)=lon((i-1)*180+j);
    lat(k)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
  n13
end
[p t1]=size(a1_TEM);
for i=1:p
    a2(i,1)=sum(a1_TEM(i,:))/t1;
    for j=1:t1
        a1_TEM(i,j)=(a1_TEM(i,j)-a2(i,1));
    end
end
[B_TEM,E_TEM,C_TEM,S1_TEM,T1_TEM] =  jadeR(a1_TEM,mode);
T_TEM=B_TEM*a1_TEM;
S_TEM=a1_TEM*T_TEM'*inv(T_TEM*T_TEM');
T_TEM=T_TEM';
A=inv(S_TEM'*S_TEM)*S_TEM'*C_TEM*S_TEM;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_TEM(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_TEM(:,i),s);
    LS_TEM(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_TEM(:,i),s);
    LS1_TEM(:,:,i)=LS_output;
end
% % % %  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % ICA, PCA, and LS of CPC_monthly in Amazon basin
% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load  200201_201903_CPC_P_Mon.mat 
time2=time;
[yv,xv]=textread('amazon_new.bln','%f %f');
s=18;
[mm,nn,t1]=size(grid_data_grace);
for n14=1:t1
  k=1;
  for i=82:113
  for j=276:312
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_CPC_M(k,n14)=grid_data_grace(i,j,n14);
    long_CPC_M(k,1)=lon((i-1)*180+j);
    lat_CPC_M(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
    end
   n14
end
[p t1]=size(a1_CPC_M);
for i=1:p
    if(a1_CPC_M(i,1)>10000)
        a1_CPC_M(i,:)=0;
    end
    a2(i,1)=sum(a1_CPC_M(i,:))/t1;
    for j=1:t1
        a1_CPC_M(i,j)=a1_CPC_M(i,j)-a2(i,1);
    end
end
[B_CPC_M,E_CPC_M,C_CPC_M,S1_CPC_M,T1_CPC_M] =  jadeR(a1_CPC_M,mode);
T_CPC_M=B_CPC_M*a1_CPC_M;
S_CPC_M=a1_CPC_M*T_CPC_M'*inv(T_CPC_M*T_CPC_M');
T_CPC_M=T_CPC_M';
A=inv(S_CPC_M'*S_CPC_M)*S_CPC_M'*C_CPC_M*S_CPC_M;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_TEM_At(i,1)=A(i,i)/A_SUM*100;
end
for i=1:mode
    [LS_output]=LS(time,T_CPC_M(:,i),s);
    LS_CPC_M(:,:,i)=LS_output;
end
for i=1:mode
    [LS_output]=LS(time,T1_CPC_M(:,i),s);
    LS1_CPC_M(:,:,i)=LS_output;
end
%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % ICA, PCA, and LS of CPC_daily_precipitation in Amazon basin
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load 200201_201903_CPC_P_Daily.mat
time3=time;
[yv,xv]=textread('amazon_new.bln','%f %f');
[mm nn t2]=size(grid_data_grace);
for n15=1:t2
  k=1;
  for i=82:113
  for j=276:312     
    lon((i-1)*180+j)=j-0.5;
    la((i-1)*180+j)=90.5-i;
    in = inpolygon(la((i-1)*180+j),lon((i-1)*180+j),xv,yv);
    if in==1;
    a1_CPC(k,n15)=grid_data_grace(i,j,n15);
    long_CPC(k,1)=lon((i-1)*180+j);
    lat_CPC(k,1)=la((i-1)*180+j);
    k=k+1;
    end
  end
  end
   n15
end
for i=1:p
    a2(i,1)=sum(a1_CPC(i,:))/t2;
    for j=1:t2
        a1_CPC(i,j)=(a1_CPC(i,j)-a2(i,1))/10;
    end
end
[B_CPC,E_CPC,C_CPC,S1_CPC,T1_CPC] =  jadeR(a1_CPC,mode);
T_CPC=B_CPC*a1_CPC;
S_CPC=a1_CPC*T_CPC'*inv(T_CPC*T_CPC');
T_CPC=T_CPC';
A=inv(S_CPC'*S_CPC)*S_CPC'*C_CPC*S_CPC;
A_SUM=0;
for i=1:mode
    A_SUM=A_SUM+A(i,i);
end
for i=1:mode
    A_CPC(i,1)=A(i,i)/A_SUM*100;
end
% **************************************************************************
k=1;
n=0;
yea=2002
for i=1:18
    i
    if(i~=18)
    a1_pre(k:k+364,:)=T_CPC(k+n:k+364+n,:);
    a2_pre(k:k+364,:)=T1_CPC(k+n:k+364+n,:);
    t(k:k+364,1)=time(k+n:k+364+n,1);
    year22(k:k+364)=yea+i-1;
    for j=1:365
        day22(j+365*(i-1))=j;
    end
    k=k+365;
    else
    a1_pre(k:k+89,:)=T_CPC(k+n:k+89+n,:);
    a2_pre(k:k+89,:)=T1_CPC(k+n:k+89+n,:);
    t(k:k+89,1)=time(k+n:k+89+n,1);
    year22(k:k+89)=yea+i-1;
    for j=1:90
        day22(j+365*(i-1))=j;
    end
    end
end
for i=1:t2
        str_year22{i}    = num2str(year22(i));
        str_day22{i}   = num2str(day22(i),'%03u');
end

np =  365;
ni =  5;
no =  0;
nl =  365;
ns =  14;
nt =  572;
for i=1:mode
    i
       ts1(:,1)=a1_pre(:,i);
       ts2(:,1)=a2_pre(:,i);
       [output]=LS(time,ts1,nt);
       LS_CPC_daily(:,:,i)=output;
       [output]=LS(time,ts2,nt);
       LS1_CPC_daily(:,:,i)=output;
end
% % %  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Reweighted daily precip temporal pattern
% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tt1=time3;
tt2=time2;
w=zeros(t2,t1);
for q=1:mode
for k=1:mode
    k
    R(k,q)=0;
    R11(k,q)=0;
    Ri(k,q)=0;
    Ri11(k,q)=0;
    for tn=1:500
%         tn
         tn1=tn/365.25;
    for j=1:t1
        a=tt2(j)-1/24;
        b=tt2(j)+1/24;   
        for i=1:t2   
            if(tt1(i)<=a)
            w(i,j)=(exp((tt1(i)-a)/tn1)-exp((tt1(i)-b)/tn1))/(b-a);
            elseif (tt1(i)<=b&&tt1(i)>a)
            w(i,j)=(1-exp((tt1(i)-b)/tn1))/(b-a);
            else
            w(i,j)=0;    
            end
        end
              s(j)=sum(w(:,j));
              for n=1:t2
              w(n,j)=w(n,j)/s(j);
              wp(n,j)=w(n,j)*LS_CPC_daily(n,7,k);
              wp1(n,j)=w(n,j)*LS1_CPC_daily(n,7,k);
              wpi(n,j)=w(n,j)*LS_CPC_daily(n,6,k);
              wpi1(n,j)=w(n,j)*LS1_CPC_daily(n,6,k);
              end
        LS_P(j,k)=sum(wp(:,j));
        LS1_P(j,k)=sum(wp1(:,j));
        LS_Pi(j,k)=sum(wpi(:,j));
        LS1_Pi(j,k)=sum(wpi1(:,j));
    end
        R1=corrcoef(LS_P(4:186,k),LS_TWS(:,7,q));
        R2(tn,k,q)=R1(2,1);
        if (R(k,q)<abs(R1(2,1)))
        R(k,q)=abs(R1(2,1));
        tt(k,q)=tn;
        LS_P_out(:,k,q)=LS_P(:,k);
        end
        R1=corrcoef(LS1_P(4:186,k),LS1_TWS(:,7,q));
        R22(tn,k,q)=R1(2,1);
        if (R11(k,q)<abs(R1(2,1)))
        R11(k,q)=abs(R1(2,1));
        tt1(k,q)=tn;
        LS1_P_out(:,k,q)=LS1_P(:,k);
        end
        R1=corrcoef(LS_Pi(4:186,k),LS_TWS(:,6,q));
        Ri2(tn,k,q)=R1(2,1);
        if (Ri(k,q)<abs(R1(2,1)))
        Ri(k,q)=abs(R1(2,1));
        tti(k,q)=tn;
        LS_Pi_out(:,k,q)=LS_Pi(:,k);
        end
        R1=corrcoef(LS1_Pi(4:186,k),LS1_TWS(:,6,q));
        Ri22(tn,k,q)=R1(2,1);
        if (Ri11(k,q)<abs(R1(2,1)))
        Ri11(k,q)=abs(R1(2,1));
        tti1(k,q)=tn;
        LS1_Pi_out(:,k,q)=LS1_Pi(:,k);
    end
    end
end
end
% %  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % %Find the best input data
% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if mode==3
Ti_intup1(:,1:3)=LS_TEM(:,6,:);
Ti_input_name{1}=['TEM_1'];
Ti_input_name{2}=['TEM_2'];
Ti_input_name{3}=['TEM_3']; 
Ti1_intup1(:,1:3)=LS1_TEM(:,6,:);
Ti1_input_name{1}=['TEM_1'];
Ti1_input_name{2}=['TEM_2'];
Ti1_input_name{3}=['TEM_3']; 
Ti_intup1(:,4:6)=LS_SAt(:,6,:);
Ti_input_name{4}=['SAt_1'];
Ti_input_name{5}=['SAt_2'];
Ti_input_name{6}=['SAt_3']; 
Ti1_intup1(:,4:6)=LS1_SAt(:,6,:);
Ti1_input_name{4}=['SAt_1'];
Ti1_input_name{5}=['SAt_2'];
Ti1_input_name{6}=['SAt_3'];
Ti_intup1(:,7:9)=LS_NAt(:,6,:);
Ti_input_name{7}=['NAt_1'];
Ti_input_name{8}=['NAt_2'];
Ti_input_name{9}=['NAt_3']; 
Ti1_intup1(:,7:9)=LS1_NAt(:,6,:);
Ti1_input_name{7}=['NAt_1'];
Ti1_input_name{8}=['NAt_2'];
Ti1_input_name{9}=['NAt_3']; 
Ti_intup1(:,10:12)=LS_SPa(:,6,:);
Ti_input_name{10}=['SPa_1'];
Ti_input_name{11}=['SPa_2'];
Ti_input_name{12}=['SPa_3']; 
Ti1_intup1(:,10:12)=LS1_SPa(:,6,:);
Ti1_input_name{10}=['SPa_1'];
Ti1_input_name{11}=['SPa_2'];
Ti1_input_name{12}=['SPa_3'];
Ti_intup1(:,13:15)=LS_Pi_out(:,1,:);
Ti_input_name{13}=['CPC_11'];
Ti_input_name{14}=['CPC_12'];
Ti_input_name{15}=['CPC_13']; 
Ti1_intup1(:,13:15)=LS1_Pi_out(:,1,:);
Ti1_input_name{13}=['CPC_11'];
Ti1_input_name{14}=['CPC_12'];
Ti1_input_name{15}=['CPC_13']; 
Ti_intup1(:,16:18)=LS_Pi_out(:,2,:);
Ti_input_name{16}=['CPC_21'];
Ti_input_name{17}=['CPC_22'];
Ti_input_name{18}=['CPC_23']; 
Ti1_intup1(:,16:18)=LS1_Pi_out(:,2,:);
Ti1_input_name{16}=['CPC_21'];
Ti1_input_name{17}=['CPC_22'];
Ti1_input_name{18}=['CPC_23']; 
Ti_intup1(:,19:21)=LS_Pi_out(:,3,:);
Ti_input_name{19}=['CPC_31'];
Ti_input_name{20}=['CPC_32'];
Ti_input_name{21}=['CPC_33']; 
Ti1_intup1(:,19:21)=LS1_Pi_out(:,3,:);
Ti1_input_name{19}=['CPC_31'];
Ti1_input_name{20}=['CPC_32'];
Ti1_input_name{21}=['CPC_33']; 
Ti_intup1(:,22:24)=LS_Baltic(:,6,:);
Ti_input_name{22}=['Baltic_1'];
Ti_input_name{23}=['Baltic_2'];
Ti_input_name{24}=['Baltic_3']; 
Ti1_intup1(:,22:24)=LS1_Baltic(:,6,:);
Ti1_input_name{22}=['Baltic_1'];
Ti1_input_name{23}=['Baltic_2'];
Ti1_input_name{24}=['Baltic_3'];
Ti_intup1(:,25:27)=LS_CPC_M(:,6,:);
Ti_input_name{25}=['CPC_M_1'];
Ti_input_name{26}=['CPC_M_2'];
Ti_input_name{27}=['CPC_M_3']; 
Ti1_intup1(:,25:27)=LS1_CPC_M(:,6,:);
Ti1_input_name{25}=['CPC_M_1'];
Ti1_input_name{26}=['CPC_M_2'];
Ti1_input_name{27}=['CPC_M_3'];
Ti_intup1(:,28:30)=LS_Black(:,6,:);
Ti_input_name{28}=['Black_1'];
Ti_input_name{29}=['Black_2'];
Ti_input_name{30}=['Black_3']; 
Ti1_intup1(:,28:30)=LS1_Black(:,6,:);
Ti1_input_name{28}=['Black_1'];
Ti1_input_name{29}=['Black_2'];
Ti1_input_name{30}=['Black_3'];
Ti_intup1(:,31:33)=LS_Hudson(:,6,:);
Ti_input_name{31}=['Hudson_1'];
Ti_input_name{32}=['Hudson_2'];
Ti_input_name{33}=['Hudson_3']; 
Ti1_intup1(:,31:33)=LS1_Hudson(:,6,:);
Ti1_input_name{31}=['Hudson_1'];
Ti1_input_name{32}=['Hudson_2'];
Ti1_input_name{33}=['Hudson_3'];
Ti_intup1(:,34:36)=LS_Ind(:,6,:);
Ti_input_name{34}=['Ind_1'];
Ti_input_name{35}=['Ind_2'];
Ti_input_name{36}=['Ind_3']; 
Ti1_intup1(:,34:36)=LS1_Ind(:,6,:);
Ti1_input_name{34}=['Ind_1'];
Ti1_input_name{35}=['Ind_2'];
Ti1_input_name{36}=['Ind_3'];
Ti_intup1(:,37:39)=LS_Med(:,6,:);
Ti_input_name{37}=['Med_1'];
Ti_input_name{38}=['Med_2'];
Ti_input_name{39}=['Med_3']; 
Ti1_intup1(:,37:39)=LS1_Med(:,6,:);
Ti1_input_name{37}=['Med_1'];
Ti1_input_name{38}=['Med_2'];
Ti1_input_name{39}=['Med_3'];
Ti_intup1(:,40:42)=LS_NPa(:,6,:);
Ti_input_name{40}=['NPa_1'];
Ti_input_name{41}=['NPa_2'];
Ti_input_name{42}=['NPa_3']; 
Ti1_intup1(:,40:42)=LS1_NPa(:,6,:);
Ti1_input_name{40}=['NPa_1'];
Ti1_input_name{41}=['NPa_2'];
Ti1_input_name{42}=['NPa_3'];
Ti_intup1(:,43:45)=LS_NGB(:,6,:);
Ti_input_name{43}=['NGB_1'];
Ti_input_name{44}=['NGB_2'];
Ti_input_name{45}=['NGB_3']; 
Ti1_intup1(:,43:45)=LS1_NGB(:,6,:);
Ti1_input_name{43}=['NGB_1'];
Ti1_input_name{44}=['NGB_2'];
Ti1_input_name{45}=['NGB_3'];
Ti_intup1(:,46:48)=LS_NNAt(:,6,:);
Ti_input_name{46}=['NNAt_1'];
Ti_input_name{47}=['NNAt_2'];
Ti_input_name{48}=['NNAt_3']; 
Ti1_intup1(:,46:48)=LS1_NNAt(:,6,:);
Ti1_input_name{46}=['NNAt_1'];
Ti1_input_name{47}=['NNAt_2'];
Ti1_input_name{48}=['NNAt_3'];
% % %**************************************************************************
Tr_intup1(:,1:3)=LS_TEM(:,7,:);
Tr_input_name{1}=['TEM_1'];
Tr_input_name{2}=['TEM_2'];
Tr_input_name{3}=['TEM_3']; 
Tr1_intup1(:,1:3)=LS1_TEM(:,7,:);
Tr1_input_name{1}=['TEM_1'];
Tr1_input_name{2}=['TEM_2'];
Tr1_input_name{3}=['TEM_3']; 
Tr_intup1(:,4:6)=LS_SAt(:,7,:);
Tr_input_name{4}=['SAt_1'];
Tr_input_name{5}=['SAt_2'];
Tr_input_name{6}=['SAt_3']; 
Tr1_intup1(:,4:6)=LS1_SAt(:,7,:);
Tr1_input_name{4}=['SAt_1'];
Tr1_input_name{5}=['SAt_2'];
Tr1_input_name{6}=['SAt_3'];
Tr_intup1(:,7:9)=LS_NAt(:,7,:);
Tr_input_name{7}=['NAt_1'];
Tr_input_name{8}=['NAt_2'];
Tr_input_name{9}=['NAt_3']; 
Tr1_intup1(:,7:9)=LS1_NAt(:,7,:);
Tr1_input_name{7}=['NAt_1'];
Tr1_input_name{8}=['NAt_2'];
Tr1_input_name{9}=['NAt_3']; 
Tr_intup1(:,10:12)=LS_SPa(:,7,:);
Tr_input_name{10}=['SPa_1'];
Tr_input_name{11}=['SPa_2'];
Tr_input_name{12}=['SPa_3']; 
Tr1_intup1(:,10:12)=LS1_SPa(:,7,:);
Tr1_input_name{10}=['SPa_1'];
Tr1_input_name{11}=['SPa_2'];
Tr1_input_name{12}=['SPa_3'];
Tr_intup1(:,13:15)=LS_P_out(:,1,:);
Tr_input_name{13}=['CPC_11'];
Tr_input_name{14}=['CPC_12'];
Tr_input_name{15}=['CPC_13']; 
Tr1_intup1(:,13:15)=LS1_P_out(:,1,:);
Tr1_input_name{13}=['CPC_11'];
Tr1_input_name{14}=['CPC_12'];
Tr1_input_name{15}=['CPC_13']; 
Tr_intup1(:,16:18)=LS_P_out(:,2,:);
Tr_input_name{16}=['CPC_21'];
Tr_input_name{17}=['CPC_22'];
Tr_input_name{18}=['CPC_23']; 
Tr1_intup1(:,16:18)=LS1_P_out(:,2,:);
Tr1_input_name{16}=['CPC_21'];
Tr1_input_name{17}=['CPC_22'];
Tr1_input_name{18}=['CPC_23']; 
Tr_intup1(:,19:21)=LS_P_out(:,3,:);
Tr_input_name{19}=['CPC_31'];
Tr_input_name{20}=['CPC_32'];
Tr_input_name{21}=['CPC_33']; 
Tr1_intup1(:,19:21)=LS1_P_out(:,3,:);
Tr1_input_name{19}=['CPC_31'];
Tr1_input_name{20}=['CPC_32'];
Tr1_input_name{21}=['CPC_33']; 
Tr_intup1(:,22:24)=LS_Baltic(:,7,:);
Tr_input_name{22}=['Baltic_1'];
Tr_input_name{23}=['Baltic_2'];
Tr_input_name{24}=['Baltic_3']; 
Tr1_intup1(:,22:24)=LS1_Baltic(:,7,:);
Tr1_input_name{22}=['Baltic_1'];
Tr1_input_name{23}=['Baltic_2'];
Tr1_input_name{24}=['Baltic_3'];
Tr_intup1(:,25:27)=LS_CPC_M(:,7,:);
Tr_input_name{25}=['CPC_M_1'];
Tr_input_name{26}=['CPC_M_2'];
Tr_input_name{27}=['CPC_M_3']; 
Tr1_intup1(:,25:27)=LS1_CPC_M(:,7,:);
Tr1_input_name{25}=['CPC_M_1'];
Tr1_input_name{26}=['CPC_M_2'];
Tr1_input_name{27}=['CPC_M_3'];
Tr_intup1(:,28:30)=LS_Black(:,7,:);
Tr_input_name{28}=['Black_1'];
Tr_input_name{29}=['Black_2'];
Tr_input_name{30}=['Black_3']; 
Tr1_intup1(:,28:30)=LS1_Black(:,7,:);
Tr1_input_name{28}=['Black_1'];
Tr1_input_name{29}=['Black_2'];
Tr1_input_name{30}=['Black_3'];
Tr_intup1(:,31:33)=LS_Hudson(:,7,:);
Tr_input_name{31}=['Hudson_1'];
Tr_input_name{32}=['Hudson_2'];
Tr_input_name{33}=['Hudson_3']; 
Tr1_intup1(:,31:33)=LS1_Hudson(:,7,:);
Tr1_input_name{31}=['Hudson_1'];
Tr1_input_name{32}=['Hudson_2'];
Tr1_input_name{33}=['Hudson_3'];
Tr_intup1(:,34:36)=LS_Ind(:,7,:);
Tr_input_name{34}=['Ind_1'];
Tr_input_name{35}=['Ind_2'];
Tr_input_name{36}=['Ind_3']; 
Tr1_intup1(:,34:36)=LS1_Ind(:,7,:);
Tr1_input_name{34}=['Ind_1'];
Tr1_input_name{35}=['Ind_2'];
Tr1_input_name{36}=['Ind_3'];
Tr_intup1(:,37:39)=LS_Med(:,7,:);
Tr_input_name{37}=['Med_1'];
Tr_input_name{38}=['Med_2'];
Tr_input_name{39}=['Med_3']; 
Tr1_intup1(:,37:39)=LS1_Med(:,7,:);
Tr1_input_name{37}=['Med_1'];
Tr1_input_name{38}=['Med_2'];
Tr1_input_name{39}=['Med_3'];
Tr_intup1(:,40:42)=LS_NPa(:,7,:);
Tr_input_name{40}=['NPa_1'];
Tr_input_name{41}=['NPa_2'];
Tr_input_name{42}=['NPa_3']; 
Tr1_intup1(:,40:42)=LS1_NPa(:,7,:);
Tr1_input_name{40}=['NPa_1'];
Tr1_input_name{41}=['NPa_2'];
Tr1_input_name{42}=['NPa_3'];
Tr_intup1(:,43:45)=LS_NGB(:,7,:);
Tr_input_name{43}=['NGB_1'];
Tr_input_name{44}=['NGB_2'];
Tr_input_name{45}=['NGB_3']; 
Tr1_intup1(:,43:45)=LS1_NGB(:,7,:);
Tr1_input_name{43}=['NGB_1'];
Tr1_input_name{44}=['NGB_2'];
Tr1_input_name{45}=['NGB_3'];
Tr_intup1(:,46:48)=LS_NNAt(:,7,:);
Tr_input_name{46}=['NNAt_1'];
Tr_input_name{47}=['NNAt_2'];
Tr_input_name{48}=['NNAt_3']; 
Tr1_intup1(:,46:48)=LS1_NNAt(:,7,:);
Tr1_input_name{46}=['NNAt_1'];
Tr1_input_name{47}=['NNAt_2'];
Tr1_input_name{48}=['NNAt_3'];
% % %**************************************************************************
Ts_intup1(:,1:3)=LS_TEM(:,3,:);
Ts_input_name{1}=['TEM_1'];
Ts_input_name{2}=['TEM_2'];
Ts_input_name{3}=['TEM_3']; 
Ts1_intup1(:,1:3)=LS1_TEM(:,3,:);
Ts1_input_name{1}=['TEM_1'];
Ts1_input_name{2}=['TEM_2'];
Ts1_input_name{3}=['TEM_3']; 
Ts_intup1(:,4:6)=LS_SAt(:,3,:);
Ts_input_name{4}=['SAt_1'];
Ts_input_name{5}=['SAt_2'];
Ts_input_name{6}=['SAt_3']; 
Ts1_intup1(:,4:6)=LS1_SAt(:,3,:);
Ts1_input_name{4}=['SAt_1'];
Ts1_input_name{5}=['SAt_2'];
Ts1_input_name{6}=['SAt_3'];
Ts_intup1(:,7:9)=LS_NAt(:,3,:);
Ts_input_name{7}=['NAt_1'];
Ts_input_name{8}=['NAt_2'];
Ts_input_name{9}=['NAt_3']; 
Ts1_intup1(:,7:9)=LS1_NAt(:,3,:);
Ts1_input_name{7}=['NAt_1'];
Ts1_input_name{8}=['NAt_2'];
Ts1_input_name{9}=['NAt_3']; 
Ts_intup1(:,10:12)=LS_SPa(:,3,:);
Ts_input_name{10}=['SPa_1'];
Ts_input_name{11}=['SPa_2'];
Ts_input_name{12}=['SPa_3']; 
Ts1_intup1(:,10:12)=LS1_SPa(:,3,:);
Ts1_input_name{10}=['SPa_1'];
Ts1_input_name{11}=['SPa_2'];
Ts1_input_name{12}=['SPa_3'];
Ts_intup1(:,13:15)=LS_NNAt(:,3,:);
Ts_input_name{13}=['NNAt_1'];
Ts_input_name{14}=['NNAt_2'];
Ts_input_name{15}=['NNAt_3']; 
Ts1_intup1(:,13:15)=LS1_NNAt(:,3,:);
Ts1_input_name{13}=['NNAt_1'];
Ts1_input_name{14}=['NNAt_2'];
Ts1_input_name{15}=['NNAt_3']; 
Ts_intup1(:,16:18)=LS_NGB(:,3,:);
Ts_input_name{16}=['NGB_1'];
Ts_input_name{17}=['NGB_2'];
Ts_input_name{18}=['NGB_3']; 
Ts1_intup1(:,16:18)=LS1_NGB(:,3,:);
Ts1_input_name{16}=['NGB_1'];
Ts1_input_name{17}=['NGB_2'];
Ts1_input_name{18}=['NGB_3']; 
Ts_intup1(:,19:21)=LS_NPa(:,3,:);
Ts_input_name{19}=['NPa_1'];
Ts_input_name{20}=['NPa_2'];
Ts_input_name{21}=['NPa_3']; 
Ts1_intup1(:,19:21)=LS1_P_out(:,3,:);
Ts1_input_name{19}=['NPa_1'];
Ts1_input_name{20}=['NPa_2'];
Ts1_input_name{21}=['NPa_3']; 
Ts_intup1(:,22:24)=LS_Baltic(:,3,:);
Ts_input_name{22}=['Baltic_1'];
Ts_input_name{23}=['Baltic_2'];
Ts_input_name{24}=['Baltic_3']; 
Ts1_intup1(:,22:24)=LS1_Baltic(:,3,:);
Ts1_input_name{22}=['Baltic_1'];
Ts1_input_name{23}=['Baltic_2'];
Ts1_input_name{24}=['Baltic_3'];
Ts_intup1(:,25:27)=LS_CPC_M(:,3,:);
Ts_input_name{25}=['CPC_M_1'];
Ts_input_name{26}=['CPC_M_2'];
Ts_input_name{27}=['CPC_M_3']; 
Ts1_intup1(:,25:27)=LS1_CPC_M(:,3,:);
Ts1_input_name{25}=['CPC_M_1'];
Ts1_input_name{26}=['CPC_M_2'];
Ts1_input_name{27}=['CPC_M_3'];
Ts_intup1(:,28:30)=LS_Black(:,3,:);
Ts_input_name{28}=['Black_1'];
Ts_input_name{29}=['Black_2'];
Ts_input_name{30}=['Black_3']; 
Ts1_intup1(:,28:30)=LS1_Black(:,3,:);
Ts1_input_name{28}=['Black_1'];
Ts1_input_name{29}=['Black_2'];
Ts1_input_name{30}=['Black_3'];
Ts_intup1(:,31:33)=LS_Hudson(:,3,:);
Ts_input_name{31}=['Hudson_1'];
Ts_input_name{32}=['Hudson_2'];
Ts_input_name{33}=['Hudson_3']; 
Ts1_intup1(:,31:33)=LS1_Hudson(:,3,:);
Ts1_input_name{31}=['Hudson_1'];
Ts1_input_name{32}=['Hudson_2'];
Ts1_input_name{33}=['Hudson_3'];
Ts_intup1(:,34:36)=LS_Ind(:,3,:);
Ts_input_name{34}=['Ind_1'];
Ts_input_name{35}=['Ind_2'];
Ts_input_name{36}=['Ind_3']; 
Ts1_intup1(:,34:36)=LS1_Ind(:,3,:);
Ts1_input_name{34}=['Ind_1'];
Ts1_input_name{35}=['Ind_2'];
Ts1_input_name{36}=['Ind_3'];
Ts_intup1(:,37:39)=LS_Med(:,3,:);
Ts_input_name{37}=['Med_1'];
Ts_input_name{38}=['Med_2'];
Ts_input_name{39}=['Med_3']; 
Ts1_intup1(:,37:39)=LS1_Med(:,3,:);
Ts1_input_name{37}=['Med_1'];
Ts1_input_name{38}=['Med_2'];
Ts1_input_name{39}=['Med_3']; 
ir=48;
ss=39;  
elseif mode==4
Ti_intup1(:,1:4)=LS_TEM(:,6,:);
Ti_input_name{1}=['TEM_1'];
Ti_input_name{2}=['TEM_2'];
Ti_input_name{3}=['TEM_3']; 
Ti_input_name{4}=['TEM_4'];
Ti1_intup1(:,1:4)=LS1_TEM(:,6,:);
Ti1_input_name{1}=['TEM_1'];
Ti1_input_name{2}=['TEM_2'];
Ti1_input_name{3}=['TEM_3'];  
Ti1_input_name{4}=['TEM_4']; 
Ti_intup1(:,5:8)=LS_SAt(:,6,:);
Ti_input_name{5}=['SAt_1'];
Ti_input_name{6}=['SAt_2'];
Ti_input_name{7}=['SAt_3']; 
Ti_input_name{8}=['SAt_4'];
Ti1_intup1(:,5:8)=LS1_SAt(:,6,:);
Ti1_input_name{5}=['SAt_1'];
Ti1_input_name{6}=['SAt_2'];
Ti1_input_name{7}=['SAt_3'];
Ti1_input_name{8}=['SAt_4'];
Ti_intup1(:,9:12)=LS_NAt(:,6,:);
Ti_input_name{9}=['NAt_1'];
Ti_input_name{10}=['NAt_2'];
Ti_input_name{11}=['NAt_3']; 
Ti_input_name{12}=['NAt_4'];
Ti1_intup1(:,9:12)=LS1_NAt(:,6,:);
Ti1_input_name{9}=['NAt_1'];
Ti1_input_name{10}=['NAt_2'];
Ti1_input_name{11}=['NAt_3']; 
Ti1_input_name{12}=['NAt_4'];  
Ti_intup1(:,13:16)=LS_SPa(:,6,:);
Ti_input_name{13}=['SPa_1'];
Ti_input_name{14}=['SPa_2'];
Ti_input_name{15}=['SPa_3']; 
Ti_input_name{16}=['SPa_4'];
Ti1_intup1(:,13:16)=LS1_SPa(:,6,:);
Ti1_input_name{13}=['SPa_1'];
Ti1_input_name{14}=['SPa_2'];
Ti1_input_name{15}=['SPa_3'];
Ti1_input_name{16}=['SPa_4'];
Ti_intup1(:,17:20)=LS_Baltic(:,6,:);
Ti_input_name{17}=['Baltic_1'];
Ti_input_name{18}=['Baltic_2'];
Ti_input_name{19}=['Baltic_3']; 
Ti_input_name{20}=['Baltic_4'];
Ti1_intup1(:,17:20)=LS1_Baltic(:,6,:);
Ti1_input_name{17}=['Baltic_1'];
Ti1_input_name{18}=['Baltic_2'];
Ti1_input_name{19}=['Baltic_3'];
Ti1_input_name{20}=['Baltic_4'];
Ti_intup1(:,21:24)=LS_CPC_M(:,6,:);
Ti_input_name{21}=['CPC_M_1'];
Ti_input_name{22}=['CPC_M_2'];
Ti_input_name{23}=['CPC_M_3']; 
Ti_input_name{24}=['CPC_M_4'];
Ti1_intup1(:,21:24)=LS1_CPC_M(:,6,:);
Ti1_input_name{21}=['CPC_M_1'];
Ti1_input_name{22}=['CPC_M_2'];
Ti1_input_name{23}=['CPC_M_3'];
Ti1_input_name{24}=['CPC_M_4'];
Ti_intup1(:,25:28)=LS_Black(:,6,:);
Ti_input_name{25}=['Black_1'];
Ti_input_name{26}=['Black_2'];
Ti_input_name{27}=['Black_3']; 
Ti_input_name{28}=['Black_4'];
Ti1_intup1(:,25:28)=LS1_Black(:,6,:);
Ti1_input_name{25}=['Black_1'];
Ti1_input_name{26}=['Black_2'];
Ti1_input_name{27}=['Black_3'];
Ti1_input_name{28}=['Black_4'];
Ti_intup1(:,29:32)=LS_Hudson(:,6,:);
Ti_input_name{29}=['Hudson_1'];
Ti_input_name{30}=['Hudson_2'];
Ti_input_name{31}=['Hudson_3']; 
Ti_input_name{32}=['Hudson_4'];
Ti1_intup1(:,29:32)=LS1_Hudson(:,6,:);
Ti1_input_name{29}=['Hudson_1'];
Ti1_input_name{30}=['Hudson_2'];
Ti1_input_name{31}=['Hudson_3'];
Ti1_input_name{32}=['Hudson_4'];
Ti_intup1(:,33:36)=LS_Ind(:,6,:);
Ti_input_name{33}=['Ind_1'];
Ti_input_name{34}=['Ind_2'];
Ti_input_name{35}=['Ind_3']; 
Ti_input_name{36}=['Ind_4'];
Ti1_intup1(:,33:36)=LS1_Ind(:,6,:);
Ti1_input_name{33}=['Ind_1'];
Ti1_input_name{34}=['Ind_2'];
Ti1_input_name{35}=['Ind_3'];
Ti1_input_name{36}=['Ind_4'];
Ti_intup1(:,37:40)=LS_Med(:,6,:);
Ti_input_name{37}=['Med_1'];
Ti_input_name{38}=['Med_2'];
Ti_input_name{39}=['Med_3']; 
Ti_input_name{40}=['Med_4'];
Ti1_intup1(:,37:40)=LS1_Med(:,6,:);
Ti1_input_name{37}=['Med_1'];
Ti1_input_name{38}=['Med_2'];
Ti1_input_name{39}=['Med_3'];
Ti1_input_name{40}=['Med_4'];
Ti_intup1(:,41:44)=LS_NPa(:,6,:);
Ti_input_name{41}=['NPa_1'];
Ti_input_name{42}=['NPa_2'];
Ti_input_name{43}=['NPa_3']; 
Ti_input_name{44}=['NPa_4'];
Ti1_intup1(:,41:44)=LS1_NPa(:,6,:);
Ti1_input_name{41}=['NPa_1'];
Ti1_input_name{42}=['NPa_2'];
Ti1_input_name{43}=['NPa_3'];
Ti1_input_name{44}=['NPa_4'];
Ti_intup1(:,45:48)=LS_NGB(:,6,:);
Ti_input_name{45}=['NGB_1'];
Ti_input_name{46}=['NGB_2'];
Ti_input_name{47}=['NGB_3']; 
Ti_input_name{48}=['NGB_4']; 
Ti1_intup1(:,45:48)=LS1_NGB(:,6,:);
Ti1_input_name{45}=['NGB_1'];
Ti1_input_name{46}=['NGB_2'];
Ti1_input_name{47}=['NGB_3'];
Ti1_input_name{48}=['NGB_4'];
Ti_intup1(:,49:52)=LS_NNAt(:,6,:);
Ti_input_name{49}=['NNAt_1'];
Ti_input_name{50}=['NNAt_2'];
Ti_input_name{51}=['NNAt_3']; 
Ti_input_name{52}=['NNAt_4']; 
Ti1_intup1(:,49:52)=LS1_NNAt(:,6,:);
Ti1_input_name{49}=['NNAt_1'];
Ti1_input_name{50}=['NNAt_2'];
Ti1_input_name{51}=['NNAt_3'];
Ti1_input_name{52}=['NNAt_4'];
Ti_intup1(:,53:56)=LS_Pi_out(:,1,:);
Ti_input_name{53}=['CPC_11'];
Ti_input_name{54}=['CPC_12'];
Ti_input_name{55}=['CPC_13']; 
Ti_input_name{56}=['CPC_14'];
Ti1_intup1(:,53:56)=LS1_Pi_out(:,1,:);
Ti1_input_name{53}=['CPC_11'];
Ti1_input_name{54}=['CPC_12'];
Ti1_input_name{55}=['CPC_13']; 
Ti1_input_name{56}=['CPC_14'];
Ti_intup1(:,57:60)=LS_Pi_out(:,2,:);
Ti_input_name{57}=['CPC_21']; 
Ti_input_name{58}=['CPC_22']; 
Ti_input_name{59}=['CPC_23']; 
Ti_input_name{60}=['CPC_24']; 
Ti1_intup1(:,57:60)=LS1_Pi_out(:,2,:);
Ti1_input_name{57}=['CPC_21'];
Ti1_input_name{58}=['CPC_22'];
Ti1_input_name{59}=['CPC_23']; 
Ti1_input_name{60}=['CPC_24'];
Ti_intup1(:,61:64)=LS_Pi_out(:,3,:);
Ti_input_name{61}=['CPC_31']; 
Ti_input_name{62}=['CPC_32']; 
Ti_input_name{63}=['CPC_33']; 
Ti_input_name{64}=['CPC_34']; 
Ti1_intup1(:,61:64)=LS1_Pi_out(:,3,:);
Ti1_input_name{61}=['CPC_31'];
Ti1_input_name{62}=['CPC_32'];
Ti1_input_name{63}=['CPC_33']; 
Ti1_input_name{64}=['CPC_34'];
Ti_intup1(:,65:68)=LS_Pi_out(:,4,:);
Ti_input_name{65}=['CPC_41'];
Ti_input_name{66}=['CPC_42'];
Ti_input_name{67}=['CPC_43']; 
Ti_input_name{68}=['CPC_44'];
Ti1_intup1(:,65:68)=LS1_Pi_out(:,4,:);
Ti1_input_name{65}=['CPC_41'];
Ti1_input_name{66}=['CPC_42'];
Ti1_input_name{67}=['CPC_43']; 
Ti1_input_name{68}=['CPC_44'];
% % %*******************************
Tr_intup1(:,1:4)=LS_TEM(:,7,:);
Tr_input_name{1}=['TEM_1'];
Tr_input_name{2}=['TEM_2'];
Tr_input_name{3}=['TEM_3']; 
Tr_input_name{4}=['TEM_4'];
Tr1_intup1(:,1:4)=LS1_TEM(:,7,:);
Tr1_input_name{1}=['TEM_1'];
Tr1_input_name{2}=['TEM_2'];
Tr1_input_name{3}=['TEM_3'];  
Tr1_input_name{4}=['TEM_4']; 
Tr_intup1(:,5:8)=LS_SAt(:,7,:);
Tr_input_name{5}=['SAt_1'];
Tr_input_name{6}=['SAt_2'];
Tr_input_name{7}=['SAt_3']; 
Tr_input_name{8}=['SAt_4'];
Tr1_intup1(:,5:8)=LS1_SAt(:,7,:);
Tr1_input_name{5}=['SAt_1'];
Tr1_input_name{6}=['SAt_2'];
Tr1_input_name{7}=['SAt_3'];
Tr1_input_name{8}=['SAt_4'];
Tr_intup1(:,9:12)=LS_NAt(:,7,:);
Tr_input_name{9}=['NAt_1'];
Tr_input_name{10}=['NAt_2'];
Tr_input_name{11}=['NAt_3']; 
Tr_input_name{12}=['NAt_4'];
Tr1_intup1(:,9:12)=LS1_NAt(:,7,:);
Tr1_input_name{9}=['NAt_1'];
Tr1_input_name{10}=['NAt_2'];
Tr1_input_name{11}=['NAt_3']; 
Tr1_input_name{12}=['NAt_4'];  
Tr_intup1(:,13:16)=LS_SPa(:,7,:);
Tr_input_name{13}=['SPa_1'];
Tr_input_name{14}=['SPa_2'];
Tr_input_name{15}=['SPa_3']; 
Tr_input_name{16}=['SPa_4'];
Tr1_intup1(:,13:16)=LS1_SPa(:,7,:);
Tr1_input_name{13}=['SPa_1'];
Tr1_input_name{14}=['SPa_2'];
Tr1_input_name{15}=['SPa_3'];
Tr1_input_name{16}=['SPa_4'];
Tr_intup1(:,17:20)=LS_Baltic(:,7,:);
Tr_input_name{17}=['Baltic_1'];
Tr_input_name{18}=['Baltic_2'];
Tr_input_name{19}=['Baltic_3']; 
Tr_input_name{20}=['Baltic_4'];
Tr1_intup1(:,17:20)=LS1_Baltic(:,7,:);
Tr1_input_name{17}=['Baltic_1'];
Tr1_input_name{18}=['Baltic_2'];
Tr1_input_name{19}=['Baltic_3'];
Tr1_input_name{20}=['Baltic_4'];
Tr_intup1(:,21:24)=LS_CPC_M(:,7,:);
Tr_input_name{21}=['CPC_M_1'];
Tr_input_name{22}=['CPC_M_2'];
Tr_input_name{23}=['CPC_M_3']; 
Tr_input_name{24}=['CPC_M_4'];
Tr1_intup1(:,21:24)=LS1_CPC_M(:,7,:);
Tr1_input_name{21}=['CPC_M_1'];
Tr1_input_name{22}=['CPC_M_2'];
Tr1_input_name{23}=['CPC_M_3'];
Tr1_input_name{24}=['CPC_M_4'];
Tr_intup1(:,25:28)=LS_Black(:,7,:);
Tr_input_name{25}=['Black_1'];
Tr_input_name{26}=['Black_2'];
Tr_input_name{27}=['Black_3']; 
Tr_input_name{28}=['Black_4'];
Tr1_intup1(:,25:28)=LS1_Black(:,7,:);
Tr1_input_name{25}=['Black_1'];
Tr1_input_name{26}=['Black_2'];
Tr1_input_name{27}=['Black_3'];
Tr1_input_name{28}=['Black_4'];
Tr_intup1(:,29:32)=LS_Hudson(:,7,:);
Tr_input_name{29}=['Hudson_1'];
Tr_input_name{30}=['Hudson_2'];
Tr_input_name{31}=['Hudson_3']; 
Tr_input_name{32}=['Hudson_4'];
Tr1_intup1(:,29:32)=LS1_Hudson(:,7,:);
Tr1_input_name{29}=['Hudson_1'];
Tr1_input_name{30}=['Hudson_2'];
Tr1_input_name{31}=['Hudson_3'];
Tr1_input_name{32}=['Hudson_4'];
Tr_intup1(:,33:36)=LS_Ind(:,7,:);
Tr_input_name{33}=['Ind_1'];
Tr_input_name{34}=['Ind_2'];
Tr_input_name{35}=['Ind_3']; 
Tr_input_name{36}=['Ind_4'];
Tr1_intup1(:,33:36)=LS1_Ind(:,7,:);
Tr1_input_name{33}=['Ind_1'];
Tr1_input_name{34}=['Ind_2'];
Tr1_input_name{35}=['Ind_3'];
Tr1_input_name{36}=['Ind_4'];
Tr_intup1(:,37:40)=LS_Med(:,7,:);
Tr_input_name{37}=['Med_1'];
Tr_input_name{38}=['Med_2'];
Tr_input_name{39}=['Med_3']; 
Tr_input_name{40}=['Med_4'];
Tr1_intup1(:,37:40)=LS1_Med(:,7,:);
Tr1_input_name{37}=['Med_1'];
Tr1_input_name{38}=['Med_2'];
Tr1_input_name{39}=['Med_3'];
Tr1_input_name{40}=['Med_4'];
Tr_intup1(:,41:44)=LS_NPa(:,7,:);
Tr_input_name{41}=['NPa_1'];
Tr_input_name{42}=['NPa_2'];
Tr_input_name{43}=['NPa_3']; 
Tr_input_name{44}=['NPa_4'];
Tr1_intup1(:,41:44)=LS1_NPa(:,7,:);
Tr1_input_name{41}=['NPa_1'];
Tr1_input_name{42}=['NPa_2'];
Tr1_input_name{43}=['NPa_3'];
Tr1_input_name{44}=['NPa_4'];
Tr_intup1(:,45:48)=LS_NGB(:,7,:);
Tr_input_name{45}=['NGB_1'];
Tr_input_name{46}=['NGB_2'];
Tr_input_name{47}=['NGB_3']; 
Tr_input_name{48}=['NGB_4']; 
Tr1_intup1(:,45:48)=LS1_NGB(:,7,:);
Tr1_input_name{45}=['NGB_1'];
Tr1_input_name{46}=['NGB_2'];
Tr1_input_name{47}=['NGB_3'];
Tr1_input_name{48}=['NGB_4'];
Tr_intup1(:,49:52)=LS_NNAt(:,7,:);
Tr_input_name{49}=['NNAt_1'];
Tr_input_name{50}=['NNAt_2'];
Tr_input_name{51}=['NNAt_3']; 
Tr_input_name{52}=['NNAt_4']; 
Tr1_intup1(:,49:52)=LS1_NNAt(:,7,:);
Tr1_input_name{49}=['NNAt_1'];
Tr1_input_name{50}=['NNAt_2'];
Tr1_input_name{51}=['NNAt_3'];
Tr1_input_name{52}=['NNAt_4'];
Tr_intup1(:,53:56)=LS_P_out(:,1,:);
Tr_input_name{53}=['CPC_11'];
Tr_input_name{54}=['CPC_12'];
Tr_input_name{55}=['CPC_13']; 
Tr_input_name{56}=['CPC_14'];
Tr1_intup1(:,53:56)=LS1_P_out(:,1,:);
Tr1_input_name{53}=['CPC_11'];
Tr1_input_name{54}=['CPC_12'];
Tr1_input_name{55}=['CPC_13']; 
Tr1_input_name{56}=['CPC_14'];
Tr_intup1(:,57:60)=LS_P_out(:,2,:);
Tr_input_name{57}=['CPC_21']; 
Tr_input_name{58}=['CPC_22']; 
Tr_input_name{59}=['CPC_23']; 
Tr_input_name{60}=['CPC_24']; 
Tr1_intup1(:,57:60)=LS1_P_out(:,2,:);
Tr1_input_name{57}=['CPC_21'];
Tr1_input_name{58}=['CPC_22'];
Tr1_input_name{59}=['CPC_23']; 
Tr1_input_name{60}=['CPC_24'];
Tr_intup1(:,61:64)=LS_P_out(:,3,:);
Tr_input_name{61}=['CPC_31']; 
Tr_input_name{62}=['CPC_32']; 
Tr_input_name{63}=['CPC_33']; 
Tr_input_name{64}=['CPC_34']; 
Tr1_intup1(:,61:64)=LS1_P_out(:,3,:);
Tr1_input_name{61}=['CPC_31'];
Tr1_input_name{62}=['CPC_32'];
Tr1_input_name{63}=['CPC_33']; 
Tr1_input_name{64}=['CPC_34'];
Tr_intup1(:,65:68)=LS_P_out(:,4,:);
Tr_input_name{65}=['CPC_41'];
Tr_input_name{66}=['CPC_42'];
Tr_input_name{67}=['CPC_43']; 
Tr_input_name{68}=['CPC_44'];
Tr1_intup1(:,65:68)=LS1_P_out(:,4,:);
Tr1_input_name{65}=['CPC_41'];
Tr1_input_name{66}=['CPC_42'];
Tr1_input_name{67}=['CPC_43']; 
Tr1_input_name{68}=['CPC_44'];    
% % %*******************************
Ts_intup1(:,1:4)=LS_TEM(:,3,:);
Ts_input_name{1}=['TEM_1'];
Ts_input_name{2}=['TEM_2'];
Ts_input_name{3}=['TEM_3']; 
Ts_input_name{4}=['TEM_4'];
Ts1_intup1(:,1:4)=LS1_TEM(:,3,:);
Ts1_input_name{1}=['TEM_1'];
Ts1_input_name{2}=['TEM_2'];
Ts1_input_name{3}=['TEM_3'];  
Ts1_input_name{4}=['TEM_4']; 
Ts_intup1(:,5:8)=LS_SAt(:,3,:);
Ts_input_name{5}=['SAt_1'];
Ts_input_name{6}=['SAt_2'];
Ts_input_name{7}=['SAt_3']; 
Ts_input_name{8}=['SAt_4'];
Ts1_intup1(:,5:8)=LS1_SAt(:,3,:);
Ts1_input_name{5}=['SAt_1'];
Ts1_input_name{6}=['SAt_2'];
Ts1_input_name{7}=['SAt_3'];
Ts1_input_name{8}=['SAt_4'];
Ts_intup1(:,9:12)=LS_NAt(:,3,:);
Ts_input_name{9}=['NAt_1'];
Ts_input_name{10}=['NAt_2'];
Ts_input_name{11}=['NAt_3']; 
Ts_input_name{12}=['NAt_4'];
Ts1_intup1(:,9:12)=LS1_NAt(:,3,:);
Ts1_input_name{9}=['NAt_1'];
Ts1_input_name{10}=['NAt_2'];
Ts1_input_name{11}=['NAt_3']; 
Ts1_input_name{12}=['NAt_4'];  
Ts_intup1(:,13:16)=LS_SPa(:,3,:);
Ts_input_name{13}=['SPa_1'];
Ts_input_name{14}=['SPa_2'];
Ts_input_name{15}=['SPa_3']; 
Ts_input_name{16}=['SPa_4'];
Ts1_intup1(:,13:16)=LS1_SPa(:,3,:);
Ts1_input_name{13}=['SPa_1'];
Ts1_input_name{14}=['SPa_2'];
Ts1_input_name{15}=['SPa_3'];
Ts1_input_name{16}=['SPa_4'];
Ts_intup1(:,17:20)=LS_Baltic(:,3,:);
Ts_input_name{17}=['Baltic_1'];
Ts_input_name{18}=['Baltic_2'];
Ts_input_name{19}=['Baltic_3']; 
Ts_input_name{20}=['Baltic_4'];
Ts1_intup1(:,17:20)=LS1_Baltic(:,3,:);
Ts1_input_name{17}=['Baltic_1'];
Ts1_input_name{18}=['Baltic_2'];
Ts1_input_name{19}=['Baltic_3'];
Ts1_input_name{20}=['Baltic_4'];
Ts_intup1(:,21:24)=LS_CPC_M(:,3,:);
Ts_input_name{21}=['CPC_M_1'];
Ts_input_name{22}=['CPC_M_2'];
Ts_input_name{23}=['CPC_M_3']; 
Ts_input_name{24}=['CPC_M_4'];
Ts1_intup1(:,21:24)=LS1_CPC_M(:,3,:);
Ts1_input_name{21}=['CPC_M_1'];
Ts1_input_name{22}=['CPC_M_2'];
Ts1_input_name{23}=['CPC_M_3'];
Ts1_input_name{24}=['CPC_M_4'];
Ts_intup1(:,25:28)=LS_Black(:,3,:);
Ts_input_name{25}=['Black_1'];
Ts_input_name{26}=['Black_2'];
Ts_input_name{27}=['Black_3']; 
Ts_input_name{28}=['Black_4'];
Ts1_intup1(:,25:28)=LS1_Black(:,3,:);
Ts1_input_name{25}=['Black_1'];
Ts1_input_name{26}=['Black_2'];
Ts1_input_name{27}=['Black_3'];
Ts1_input_name{28}=['Black_4'];
Ts_intup1(:,29:32)=LS_Hudson(:,3,:);
Ts_input_name{29}=['Hudson_1'];
Ts_input_name{30}=['Hudson_2'];
Ts_input_name{31}=['Hudson_3']; 
Ts_input_name{32}=['Hudson_4'];
Ts1_intup1(:,29:32)=LS1_Hudson(:,3,:);
Ts1_input_name{29}=['Hudson_1'];
Ts1_input_name{30}=['Hudson_2'];
Ts1_input_name{31}=['Hudson_3'];
Ts1_input_name{32}=['Hudson_4'];
Ts_intup1(:,33:36)=LS_Ind(:,3,:);
Ts_input_name{33}=['Ind_1'];
Ts_input_name{34}=['Ind_2'];
Ts_input_name{35}=['Ind_3']; 
Ts_input_name{36}=['Ind_4'];
Ts1_intup1(:,33:36)=LS1_Ind(:,3,:);
Ts1_input_name{33}=['Ind_1'];
Ts1_input_name{34}=['Ind_2'];
Ts1_input_name{35}=['Ind_3'];
Ts1_input_name{36}=['Ind_4'];
Ts_intup1(:,37:40)=LS_Med(:,3,:);
Ts_input_name{37}=['Med_1'];
Ts_input_name{38}=['Med_2'];
Ts_input_name{39}=['Med_3']; 
Ts_input_name{40}=['Med_4'];
Ts1_intup1(:,37:40)=LS1_Med(:,3,:);
Ts1_input_name{37}=['Med_1'];
Ts1_input_name{38}=['Med_2'];
Ts1_input_name{39}=['Med_3'];
Ts1_input_name{40}=['Med_4'];
Ts_intup1(:,41:44)=LS_NPa(:,3,:);
Ts_input_name{41}=['NPa_1'];
Ts_input_name{42}=['NPa_2'];
Ts_input_name{43}=['NPa_3']; 
Ts_input_name{44}=['NPa_4'];
Ts1_intup1(:,41:44)=LS1_NPa(:,3,:);
Ts1_input_name{41}=['NPa_1'];
Ts1_input_name{42}=['NPa_2'];
Ts1_input_name{43}=['NPa_3'];
Ts1_input_name{44}=['NPa_4'];
Ts_intup1(:,45:48)=LS_NGB(:,3,:);
Ts_input_name{45}=['NGB_1'];
Ts_input_name{46}=['NGB_2'];
Ts_input_name{47}=['NGB_3']; 
Ts_input_name{48}=['NGB_4']; 
Ts1_intup1(:,45:48)=LS1_NGB(:,3,:);
Ts1_input_name{45}=['NGB_1'];
Ts1_input_name{46}=['NGB_2'];
Ts1_input_name{47}=['NGB_3'];
Ts1_input_name{48}=['NGB_4'];
Ts_intup1(:,49:52)=LS_NNAt(:,3,:);
Ts_input_name{49}=['NNAt_1'];
Ts_input_name{50}=['NNAt_2'];
Ts_input_name{51}=['NNAt_3']; 
Ts_input_name{52}=['NNAt_4']; 
Ts1_intup1(:,49:52)=LS1_NNAt(:,3,:);
Ts1_input_name{49}=['NNAt_1'];
Ts1_input_name{50}=['NNAt_2'];
Ts1_input_name{51}=['NNAt_3'];
Ts1_input_name{52}=['NNAt_4'];
ir=68;
ss=52;
elseif mode==5
Ti_intup1(:,1:5)=LS_TEM(:,6,:);
Ti_input_name{1}=['TEM_1'];
Ti_input_name{2}=['TEM_2'];
Ti_input_name{3}=['TEM_3']; 
Ti_input_name{4}=['TEM_4'];
Ti_input_name{5}=['TEM_5'];
Ti1_intup1(:,1:5)=LS1_TEM(:,6,:);
Ti1_input_name{1}=['TEM_1'];
Ti1_input_name{2}=['TEM_2'];
Ti1_input_name{3}=['TEM_3'];  
Ti1_input_name{4}=['TEM_4']; 
Ti1_input_name{5}=['TEM_5']; 
Ti_intup1(:,6:10)=LS_SAt(:,6,:);
Ti_input_name{6}=['SAt_1'];
Ti_input_name{7}=['SAt_2'];
Ti_input_name{8}=['SAt_3']; 
Ti_input_name{9}=['SAt_4'];
Ti_input_name{10}=['SAt_5'];
Ti1_intup1(:,6:10)=LS1_SAt(:,6,:);
Ti1_input_name{6}=['SAt_1'];
Ti1_input_name{7}=['SAt_2'];
Ti1_input_name{8}=['SAt_3'];
Ti1_input_name{9}=['SAt_4'];
Ti1_input_name{10}=['SAt_5'];
Ti_intup1(:,11:15)=LS_NAt(:,6,:);
Ti_input_name{11}=['NAt_1'];
Ti_input_name{12}=['NAt_2'];
Ti_input_name{13}=['NAt_3']; 
Ti_input_name{14}=['NAt_4'];
Ti_input_name{15}=['NAt_5'];
Ti1_intup1(:,11:15)=LS1_NAt(:,6,:);
Ti1_input_name{11}=['NAt_1'];
Ti1_input_name{12}=['NAt_2'];
Ti1_input_name{13}=['NAt_3']; 
Ti1_input_name{14}=['NAt_4'];
Ti1_input_name{15}=['NAt_5']; 
Ti_intup1(:,16:20)=LS_SPa(:,6,:);
Ti_input_name{16}=['SPa_1'];
Ti_input_name{17}=['SPa_2'];
Ti_input_name{18}=['SPa_3']; 
Ti_input_name{19}=['SPa_4'];
Ti_input_name{20}=['SPa_5'];
Ti1_intup1(:,16:20)=LS1_SPa(:,6,:);
Ti1_input_name{16}=['SPa_1'];
Ti1_input_name{17}=['SPa_2'];
Ti1_input_name{18}=['SPa_3'];
Ti1_input_name{19}=['SPa_4'];
Ti1_input_name{20}=['SPa_5'];
Ti_intup1(:,21:25)=LS_Baltic(:,6,:);
Ti_input_name{21}=['Baltic_1'];
Ti_input_name{22}=['Baltic_2'];
Ti_input_name{23}=['Baltic_3']; 
Ti_input_name{24}=['Baltic_4'];
Ti_input_name{25}=['Baltic_5']; 
Ti1_intup1(:,21:25)=LS1_Baltic(:,6,:);
Ti1_input_name{21}=['Baltic_1'];
Ti1_input_name{22}=['Baltic_2'];
Ti1_input_name{23}=['Baltic_3'];
Ti1_input_name{24}=['Baltic_4'];
Ti1_input_name{25}=['Baltic_5'];
Ti_intup1(:,26:30)=LS_CPC_M(:,6,:);
Ti_input_name{26}=['CPC_M_1'];
Ti_input_name{27}=['CPC_M_2'];
Ti_input_name{28}=['CPC_M_3']; 
Ti_input_name{29}=['CPC_M_4'];
Ti_input_name{30}=['CPC_M_5'];
Ti1_intup1(:,26:30)=LS1_CPC_M(:,6,:);
Ti1_input_name{26}=['CPC_M_1'];
Ti1_input_name{27}=['CPC_M_2'];
Ti1_input_name{28}=['CPC_M_3'];
Ti1_input_name{29}=['CPC_M_4'];
Ti1_input_name{30}=['CPC_M_5'];
Ti_intup1(:,31:35)=LS_Black(:,6,:);
Ti_input_name{31}=['Black_1'];
Ti_input_name{32}=['Black_2'];
Ti_input_name{33}=['Black_3']; 
Ti_input_name{34}=['Black_4'];
Ti_input_name{35}=['Black_5'];
Ti1_intup1(:,31:35)=LS1_Black(:,6,:);
Ti1_input_name{31}=['Black_1'];
Ti1_input_name{32}=['Black_2'];
Ti1_input_name{33}=['Black_3'];
Ti1_input_name{34}=['Black_4'];
Ti1_input_name{35}=['Black_5'];
Ti_intup1(:,36:40)=LS_Hudson(:,6,:);
Ti_input_name{36}=['Hudson_1'];
Ti_input_name{37}=['Hudson_2'];
Ti_input_name{38}=['Hudson_3']; 
Ti_input_name{39}=['Hudson_4'];
Ti_input_name{40}=['Hudson_5']; 
Ti1_intup1(:,36:40)=LS1_Hudson(:,6,:);
Ti1_input_name{36}=['Hudson_1'];
Ti1_input_name{37}=['Hudson_2'];
Ti1_input_name{38}=['Hudson_3'];
Ti1_input_name{39}=['Hudson_4'];
Ti1_input_name{40}=['Hudson_5'];
Ti_intup1(:,41:45)=LS_Ind(:,6,:);
Ti_input_name{41}=['Ind_1'];
Ti_input_name{42}=['Ind_2'];
Ti_input_name{43}=['Ind_3']; 
Ti_input_name{44}=['Ind_4'];
Ti_input_name{45}=['Ind_5'];
Ti1_intup1(:,41:45)=LS1_Ind(:,6,:);
Ti1_input_name{41}=['Ind_1'];
Ti1_input_name{42}=['Ind_2'];
Ti1_input_name{43}=['Ind_3'];
Ti1_input_name{44}=['Ind_4'];
Ti1_input_name{45}=['Ind_5'];
Ti_intup1(:,46:50)=LS_Med(:,6,:);
Ti_input_name{46}=['Med_1'];
Ti_input_name{47}=['Med_2'];
Ti_input_name{48}=['Med_3']; 
Ti_input_name{49}=['Med_4'];
Ti_input_name{50}=['Med_5'];
Ti1_intup1(:,46:50)=LS1_Med(:,6,:);
Ti1_input_name{46}=['Med_1'];
Ti1_input_name{47}=['Med_2'];
Ti1_input_name{48}=['Med_3'];
Ti1_input_name{49}=['Med_4'];
Ti1_input_name{50}=['Med_5'];
Ti_intup1(:,51:55)=LS_NPa(:,6,:);
Ti_input_name{51}=['NPa_1'];
Ti_input_name{52}=['NPa_2'];
Ti_input_name{53}=['NPa_3']; 
Ti_input_name{54}=['NPa_4'];
Ti_input_name{55}=['NPa_5'];
Ti1_intup1(:,51:55)=LS1_NPa(:,6,:);
Ti1_input_name{51}=['NPa_1'];
Ti1_input_name{52}=['NPa_2'];
Ti1_input_name{53}=['NPa_3'];
Ti1_input_name{54}=['NPa_4'];
Ti1_input_name{55}=['NPa_5'];
Ti_intup1(:,56:60)=LS_NGB(:,6,:);
Ti_input_name{56}=['NGB_1'];
Ti_input_name{57}=['NGB_2'];
Ti_input_name{58}=['NGB_3']; 
Ti_input_name{59}=['NGB_4'];
Ti_input_name{60}=['NGB_5']; 
Ti1_intup1(:,56:60)=LS1_NGB(:,6,:);
Ti1_input_name{56}=['NGB_1'];
Ti1_input_name{57}=['NGB_2'];
Ti1_input_name{58}=['NGB_3'];
Ti1_input_name{59}=['NGB_4'];
Ti1_input_name{60}=['NGB_5'];
Ti_intup1(:,61:65)=LS_NNAt(:,6,:);
Ti_input_name{61}=['NNAt_1'];
Ti_input_name{62}=['NNAt_2'];
Ti_input_name{63}=['NNAt_3']; 
Ti_input_name{64}=['NNAt_4'];
Ti_input_name{65}=['NNAt_5'];
Ti1_intup1(:,61:65)=LS1_NNAt(:,6,:);
Ti1_input_name{61}=['NNAt_1'];
Ti1_input_name{62}=['NNAt_2'];
Ti1_input_name{63}=['NNAt_3'];
Ti1_input_name{64}=['NNAt_4'];
Ti1_input_name{65}=['NNAt_5'];
Ti_intup1(:,66:70)=LS_Pi_out(:,1,:);
Ti_input_name{66}=['CPC_11'];
Ti_input_name{67}=['CPC_12'];
Ti_input_name{68}=['CPC_13']; 
Ti_input_name{69}=['CPC_14'];
Ti_input_name{70}=['CPC_15'];
Ti1_intup1(:,66:70)=LS1_Pi_out(:,1,:);
Ti1_input_name{66}=['CPC_11'];
Ti1_input_name{67}=['CPC_12'];
Ti1_input_name{68}=['CPC_13']; 
Ti1_input_name{69}=['CPC_14'];
Ti1_input_name{70}=['CPC_15'];
Ti_intup1(:,71:75)=LS_Pi_out(:,2,:);
Ti_input_name{71}=['CPC_21']; 
Ti_input_name{72}=['CPC_22']; 
Ti_input_name{73}=['CPC_23']; 
Ti_input_name{74}=['CPC_24']; 
Ti_input_name{75}=['CPC_25']; 
Ti1_intup1(:,71:75)=LS1_Pi_out(:,2,:);
Ti1_input_name{71}=['CPC_21'];
Ti1_input_name{72}=['CPC_22'];
Ti1_input_name{73}=['CPC_23']; 
Ti1_input_name{74}=['CPC_24'];
Ti1_input_name{75}=['CPC_25'];
Ti_intup1(:,76:80)=LS_Pi_out(:,3,:);
Ti_input_name{76}=['CPC_31']; 
Ti_input_name{77}=['CPC_32']; 
Ti_input_name{78}=['CPC_33']; 
Ti_input_name{79}=['CPC_34']; 
Ti_input_name{80}=['CPC_35']; 
Ti1_intup1(:,76:80)=LS1_Pi_out(:,3,:);
Ti1_input_name{76}=['CPC_31'];
Ti1_input_name{77}=['CPC_32'];
Ti1_input_name{78}=['CPC_33']; 
Ti1_input_name{79}=['CPC_34'];
Ti1_input_name{80}=['CPC_35'];
Ti_intup1(:,81:85)=LS_Pi_out(:,4,:);
Ti_input_name{81}=['CPC_41'];
Ti_input_name{82}=['CPC_42'];
Ti_input_name{83}=['CPC_43']; 
Ti_input_name{84}=['CPC_44'];
Ti_input_name{85}=['CPC_45'];
Ti1_intup1(:,81:85)=LS1_Pi_out(:,4,:);
Ti1_input_name{81}=['CPC_41'];
Ti1_input_name{82}=['CPC_42'];
Ti1_input_name{83}=['CPC_43']; 
Ti1_input_name{84}=['CPC_44'];
Ti1_input_name{85}=['CPC_45'];  
Ti_intup1(:,86:90)=LS_Pi_out(:,5,:);
Ti_input_name{86}=['CPC_51']; 
Ti_input_name{87}=['CPC_52']; 
Ti_input_name{88}=['CPC_53']; 
Ti_input_name{89}=['CPC_54']; 
Ti_input_name{90}=['CPC_55']; 
Ti1_intup1(:,86:90)=LS1_Pi_out(:,5,:);
Ti1_input_name{86}=['CPC_51'];
Ti1_input_name{87}=['CPC_52'];
Ti1_input_name{88}=['CPC_53']; 
Ti1_input_name{89}=['CPC_54'];
Ti1_input_name{90}=['CPC_55'];   
% % %*******************************
Tr_intup1(:,1:5)=LS_TEM(:,7,:);
Tr_input_name{1}=['TEM_1'];
Tr_input_name{2}=['TEM_2'];
Tr_input_name{3}=['TEM_3']; 
Tr_input_name{4}=['TEM_4'];
Tr_input_name{5}=['TEM_5'];
Tr1_intup1(:,1:5)=LS1_TEM(:,7,:);
Tr1_input_name{1}=['TEM_1'];
Tr1_input_name{2}=['TEM_2'];
Tr1_input_name{3}=['TEM_3'];  
Tr1_input_name{4}=['TEM_4']; 
Tr1_input_name{5}=['TEM_5']; 
Tr_intup1(:,6:10)=LS_SAt(:,7,:);
Tr_input_name{6}=['SAt_1'];
Tr_input_name{7}=['SAt_2'];
Tr_input_name{8}=['SAt_3']; 
Tr_input_name{9}=['SAt_4'];
Tr_input_name{10}=['SAt_5'];
Tr1_intup1(:,6:10)=LS1_SAt(:,7,:);
Tr1_input_name{6}=['SAt_1'];
Tr1_input_name{7}=['SAt_2'];
Tr1_input_name{8}=['SAt_3'];
Tr1_input_name{9}=['SAt_4'];
Tr1_input_name{10}=['SAt_5'];
Tr_intup1(:,11:15)=LS_NAt(:,7,:);
Tr_input_name{11}=['NAt_1'];
Tr_input_name{12}=['NAt_2'];
Tr_input_name{13}=['NAt_3']; 
Tr_input_name{14}=['NAt_4'];
Tr_input_name{15}=['NAt_5'];
Tr1_intup1(:,11:15)=LS1_NAt(:,7,:);
Tr1_input_name{11}=['NAt_1'];
Tr1_input_name{12}=['NAt_2'];
Tr1_input_name{13}=['NAt_3']; 
Tr1_input_name{14}=['NAt_4'];
Tr1_input_name{15}=['NAt_5']; 
Tr_intup1(:,16:20)=LS_SPa(:,7,:);
Tr_input_name{16}=['SPa_1'];
Tr_input_name{17}=['SPa_2'];
Tr_input_name{18}=['SPa_3']; 
Tr_input_name{19}=['SPa_4'];
Tr_input_name{20}=['SPa_5'];
Tr1_intup1(:,16:20)=LS1_SPa(:,7,:);
Tr1_input_name{16}=['SPa_1'];
Tr1_input_name{17}=['SPa_2'];
Tr1_input_name{18}=['SPa_3'];
Tr1_input_name{19}=['SPa_4'];
Tr1_input_name{20}=['SPa_5'];
Tr_intup1(:,21:25)=LS_Baltic(:,7,:);
Tr_input_name{21}=['Baltic_1'];
Tr_input_name{22}=['Baltic_2'];
Tr_input_name{23}=['Baltic_3']; 
Tr_input_name{24}=['Baltic_4'];
Tr_input_name{25}=['Baltic_5']; 
Tr1_intup1(:,21:25)=LS1_Baltic(:,7,:);
Tr1_input_name{21}=['Baltic_1'];
Tr1_input_name{22}=['Baltic_2'];
Tr1_input_name{23}=['Baltic_3'];
Tr1_input_name{24}=['Baltic_4'];
Tr1_input_name{25}=['Baltic_5'];
Tr_intup1(:,26:30)=LS_CPC_M(:,7,:);
Tr_input_name{26}=['CPC_M_1'];
Tr_input_name{27}=['CPC_M_2'];
Tr_input_name{28}=['CPC_M_3']; 
Tr_input_name{29}=['CPC_M_4'];
Tr_input_name{30}=['CPC_M_5'];
Tr1_intup1(:,26:30)=LS1_CPC_M(:,7,:);
Tr1_input_name{26}=['CPC_M_1'];
Tr1_input_name{27}=['CPC_M_2'];
Tr1_input_name{28}=['CPC_M_3'];
Tr1_input_name{29}=['CPC_M_4'];
Tr1_input_name{30}=['CPC_M_5'];
Tr_intup1(:,31:35)=LS_Black(:,7,:);
Tr_input_name{31}=['Black_1'];
Tr_input_name{32}=['Black_2'];
Tr_input_name{33}=['Black_3']; 
Tr_input_name{34}=['Black_4'];
Tr_input_name{35}=['Black_5'];
Tr1_intup1(:,31:35)=LS1_Black(:,7,:);
Tr1_input_name{31}=['Black_1'];
Tr1_input_name{32}=['Black_2'];
Tr1_input_name{33}=['Black_3'];
Tr1_input_name{34}=['Black_4'];
Tr1_input_name{35}=['Black_5'];
Tr_intup1(:,36:40)=LS_Hudson(:,7,:);
Tr_input_name{36}=['Hudson_1'];
Tr_input_name{37}=['Hudson_2'];
Tr_input_name{38}=['Hudson_3']; 
Tr_input_name{39}=['Hudson_4'];
Tr_input_name{40}=['Hudson_5']; 
Tr1_intup1(:,36:40)=LS1_Hudson(:,7,:);
Tr1_input_name{36}=['Hudson_1'];
Tr1_input_name{37}=['Hudson_2'];
Tr1_input_name{38}=['Hudson_3'];
Tr1_input_name{39}=['Hudson_4'];
Tr1_input_name{40}=['Hudson_5'];
Tr_intup1(:,41:45)=LS_Ind(:,7,:);
Tr_input_name{41}=['Ind_1'];
Tr_input_name{42}=['Ind_2'];
Tr_input_name{43}=['Ind_3']; 
Tr_input_name{44}=['Ind_4'];
Tr_input_name{45}=['Ind_5'];
Tr1_intup1(:,41:45)=LS1_Ind(:,7,:);
Tr1_input_name{41}=['Ind_1'];
Tr1_input_name{42}=['Ind_2'];
Tr1_input_name{43}=['Ind_3'];
Tr1_input_name{44}=['Ind_4'];
Tr1_input_name{45}=['Ind_5'];
Tr_intup1(:,46:50)=LS_Med(:,7,:);
Tr_input_name{46}=['Med_1'];
Tr_input_name{47}=['Med_2'];
Tr_input_name{48}=['Med_3']; 
Tr_input_name{49}=['Med_4'];
Tr_input_name{50}=['Med_5'];
Tr1_intup1(:,46:50)=LS1_Med(:,7,:);
Tr1_input_name{46}=['Med_1'];
Tr1_input_name{47}=['Med_2'];
Tr1_input_name{48}=['Med_3'];
Tr1_input_name{49}=['Med_4'];
Tr1_input_name{50}=['Med_5'];
Tr_intup1(:,51:55)=LS_NPa(:,7,:);
Tr_input_name{51}=['NPa_1'];
Tr_input_name{52}=['NPa_2'];
Tr_input_name{53}=['NPa_3']; 
Tr_input_name{54}=['NPa_4'];
Tr_input_name{55}=['NPa_5'];
Tr1_intup1(:,51:55)=LS1_NPa(:,7,:);
Tr1_input_name{51}=['NPa_1'];
Tr1_input_name{52}=['NPa_2'];
Tr1_input_name{53}=['NPa_3'];
Tr1_input_name{54}=['NPa_4'];
Tr1_input_name{55}=['NPa_5'];
Tr_intup1(:,56:60)=LS_NGB(:,7,:);
Tr_input_name{56}=['NGB_1'];
Tr_input_name{57}=['NGB_2'];
Tr_input_name{58}=['NGB_3']; 
Tr_input_name{59}=['NGB_4'];
Tr_input_name{60}=['NGB_5']; 
Tr1_intup1(:,56:60)=LS1_NGB(:,7,:);
Tr1_input_name{56}=['NGB_1'];
Tr1_input_name{57}=['NGB_2'];
Tr1_input_name{58}=['NGB_3'];
Tr1_input_name{59}=['NGB_4'];
Tr1_input_name{60}=['NGB_5'];
Tr_intup1(:,61:65)=LS_NNAt(:,7,:);
Tr_input_name{61}=['NNAt_1'];
Tr_input_name{62}=['NNAt_2'];
Tr_input_name{63}=['NNAt_3']; 
Tr_input_name{64}=['NNAt_4'];
Tr_input_name{65}=['NNAt_5'];
Tr1_intup1(:,61:65)=LS1_NNAt(:,7,:);
Tr1_input_name{61}=['NNAt_1'];
Tr1_input_name{62}=['NNAt_2'];
Tr1_input_name{63}=['NNAt_3'];
Tr1_input_name{64}=['NNAt_4'];
Tr1_input_name{65}=['NNAt_5'];
Tr_intup1(:,66:70)=LS_P_out(:,1,:);
Tr_input_name{66}=['CPC_11'];
Tr_input_name{67}=['CPC_12'];
Tr_input_name{68}=['CPC_13']; 
Tr_input_name{69}=['CPC_14'];
Tr_input_name{70}=['CPC_15'];
Tr1_intup1(:,66:70)=LS1_P_out(:,1,:);
Tr1_input_name{66}=['CPC_11'];
Tr1_input_name{67}=['CPC_12'];
Tr1_input_name{68}=['CPC_13']; 
Tr1_input_name{69}=['CPC_14'];
Tr1_input_name{70}=['CPC_15'];
Tr_intup1(:,71:75)=LS_P_out(:,2,:);
Tr_input_name{71}=['CPC_21']; 
Tr_input_name{72}=['CPC_22']; 
Tr_input_name{73}=['CPC_23']; 
Tr_input_name{74}=['CPC_24']; 
Tr_input_name{75}=['CPC_25']; 
Tr1_intup1(:,71:75)=LS1_P_out(:,2,:);
Tr1_input_name{71}=['CPC_21'];
Tr1_input_name{72}=['CPC_22'];
Tr1_input_name{73}=['CPC_23']; 
Tr1_input_name{74}=['CPC_24'];
Tr1_input_name{75}=['CPC_25'];
Tr_intup1(:,76:80)=LS_P_out(:,3,:);
Tr_input_name{76}=['CPC_31']; 
Tr_input_name{77}=['CPC_32']; 
Tr_input_name{78}=['CPC_33']; 
Tr_input_name{79}=['CPC_34']; 
Tr_input_name{80}=['CPC_35']; 
Tr1_intup1(:,76:80)=LS1_P_out(:,3,:);
Tr1_input_name{76}=['CPC_31'];
Tr1_input_name{77}=['CPC_32'];
Tr1_input_name{78}=['CPC_33']; 
Tr1_input_name{79}=['CPC_34'];
Tr1_input_name{80}=['CPC_35'];
Tr_intup1(:,81:85)=LS_P_out(:,4,:);
Tr_input_name{81}=['CPC_41'];
Tr_input_name{82}=['CPC_42'];
Tr_input_name{83}=['CPC_43']; 
Tr_input_name{84}=['CPC_44'];
Tr_input_name{85}=['CPC_45'];
Tr1_intup1(:,81:85)=LS1_P_out(:,4,:);
Tr1_input_name{81}=['CPC_41'];
Tr1_input_name{82}=['CPC_42'];
Tr1_input_name{83}=['CPC_43']; 
Tr1_input_name{84}=['CPC_44'];
Tr1_input_name{85}=['CPC_45'];  
Tr_intup1(:,86:90)=LS_P_out(:,5,:);
Tr_input_name{86}=['CPC_51']; 
Tr_input_name{87}=['CPC_52']; 
Tr_input_name{88}=['CPC_53']; 
Tr_input_name{89}=['CPC_54']; 
Tr_input_name{90}=['CPC_55']; 
Tr1_intup1(:,86:90)=LS1_P_out(:,5,:);
Tr1_input_name{86}=['CPC_51'];
Tr1_input_name{87}=['CPC_52'];
Tr1_input_name{88}=['CPC_53']; 
Tr1_input_name{89}=['CPC_54'];
Tr1_input_name{90}=['CPC_55'];        
% % %*******************************
Ts_intup1(:,1:5)=LS_TEM(:,3,:);
Ts_input_name{1}=['TEM_1'];
Ts_input_name{2}=['TEM_2'];
Ts_input_name{3}=['TEM_3']; 
Ts_input_name{4}=['TEM_4'];
Ts_input_name{5}=['TEM_5'];
Ts1_intup1(:,1:5)=LS1_TEM(:,6,:);
Ts1_input_name{1}=['TEM_1'];
Ts1_input_name{2}=['TEM_2'];
Ts1_input_name{3}=['TEM_3'];  
Ts1_input_name{4}=['TEM_4']; 
Ts1_input_name{5}=['TEM_5']; 
Ts_intup1(:,6:10)=LS_SAt(:,3,:);
Ts_input_name{6}=['SAt_1'];
Ts_input_name{7}=['SAt_2'];
Ts_input_name{8}=['SAt_3']; 
Ts_input_name{9}=['SAt_4'];
Ts_input_name{10}=['SAt_5'];
Ts1_intup1(:,6:10)=LS1_SAt(:,3,:);
Ts1_input_name{6}=['SAt_1'];
Ts1_input_name{7}=['SAt_2'];
Ts1_input_name{8}=['SAt_3'];
Ts1_input_name{9}=['SAt_4'];
Ts1_input_name{10}=['SAt_5'];
Ts_intup1(:,11:15)=LS_NAt(:,3,:);
Ts_input_name{11}=['NAt_1'];
Ts_input_name{12}=['NAt_2'];
Ts_input_name{13}=['NAt_3']; 
Ts_input_name{14}=['NAt_4'];
Ts_input_name{15}=['NAt_5'];
Ts1_intup1(:,11:15)=LS1_NAt(:,3,:);
Ts1_input_name{11}=['NAt_1'];
Ts1_input_name{12}=['NAt_2'];
Ts1_input_name{13}=['NAt_3']; 
Ts1_input_name{14}=['NAt_4'];
Ts1_input_name{15}=['NAt_5']; 
Ts_intup1(:,16:20)=LS_SPa(:,3,:);
Ts_input_name{16}=['SPa_1'];
Ts_input_name{17}=['SPa_2'];
Ts_input_name{18}=['SPa_3']; 
Ts_input_name{19}=['SPa_4'];
Ts_input_name{20}=['SPa_5'];
Ts1_intup1(:,16:20)=LS1_SPa(:,3,:);
Ts1_input_name{16}=['SPa_1'];
Ts1_input_name{17}=['SPa_2'];
Ts1_input_name{18}=['SPa_3'];
Ts1_input_name{19}=['SPa_4'];
Ts1_input_name{20}=['SPa_5'];
Ts_intup1(:,21:25)=LS_Baltic(:,3,:);
Ts_input_name{21}=['Baltic_1'];
Ts_input_name{22}=['Baltic_2'];
Ts_input_name{23}=['Baltic_3']; 
Ts_input_name{24}=['Baltic_4'];
Ts_input_name{25}=['Baltic_5']; 
Ts1_intup1(:,21:25)=LS1_Baltic(:,3,:);
Ts1_input_name{21}=['Baltic_1'];
Ts1_input_name{22}=['Baltic_2'];
Ts1_input_name{23}=['Baltic_3'];
Ts1_input_name{24}=['Baltic_4'];
Ts1_input_name{25}=['Baltic_5'];
Ts_intup1(:,26:30)=LS_CPC_M(:,3,:);
Ts_input_name{26}=['CPC_M_1'];
Ts_input_name{27}=['CPC_M_2'];
Ts_input_name{28}=['CPC_M_3']; 
Ts_input_name{29}=['CPC_M_4'];
Ts_input_name{30}=['CPC_M_5'];
Ts1_intup1(:,26:30)=LS1_CPC_M(:,3,:);
Ts1_input_name{26}=['CPC_M_1'];
Ts1_input_name{27}=['CPC_M_2'];
Ts1_input_name{28}=['CPC_M_3'];
Ts1_input_name{29}=['CPC_M_4'];
Ts1_input_name{30}=['CPC_M_5'];
Ts_intup1(:,31:35)=LS_Black(:,3,:);
Ts_input_name{31}=['Black_1'];
Ts_input_name{32}=['Black_2'];
Ts_input_name{33}=['Black_3']; 
Ts_input_name{34}=['Black_4'];
Ts_input_name{35}=['Black_5'];
Ts1_intup1(:,31:35)=LS1_Black(:,3,:);
Ts1_input_name{31}=['Black_1'];
Ts1_input_name{32}=['Black_2'];
Ts1_input_name{33}=['Black_3'];
Ts1_input_name{34}=['Black_4'];
Ts1_input_name{35}=['Black_5'];
Ts_intup1(:,36:40)=LS_Hudson(:,3,:);
Ts_input_name{36}=['Hudson_1'];
Ts_input_name{37}=['Hudson_2'];
Ts_input_name{38}=['Hudson_3']; 
Ts_input_name{39}=['Hudson_4'];
Ts_input_name{40}=['Hudson_5']; 
Ts1_intup1(:,36:40)=LS1_Hudson(:,3,:);
Ts1_input_name{36}=['Hudson_1'];
Ts1_input_name{37}=['Hudson_2'];
Ts1_input_name{38}=['Hudson_3'];
Ts1_input_name{39}=['Hudson_4'];
Ts1_input_name{40}=['Hudson_5'];
Ts_intup1(:,41:45)=LS_Ind(:,3,:);
Ts_input_name{41}=['Ind_1'];
Ts_input_name{42}=['Ind_2'];
Ts_input_name{43}=['Ind_3']; 
Ts_input_name{44}=['Ind_4'];
Ts_input_name{45}=['Ind_5'];
Ts1_intup1(:,41:45)=LS1_Ind(:,3,:);
Ts1_input_name{41}=['Ind_1'];
Ts1_input_name{42}=['Ind_2'];
Ts1_input_name{43}=['Ind_3'];
Ts1_input_name{44}=['Ind_4'];
Ts1_input_name{45}=['Ind_5'];
Ts_intup1(:,46:50)=LS_Med(:,3,:);
Ts_input_name{46}=['Med_1'];
Ts_input_name{47}=['Med_2'];
Ts_input_name{48}=['Med_3']; 
Ts_input_name{49}=['Med_4'];
Ts_input_name{50}=['Med_5'];
Ts1_intup1(:,46:50)=LS1_Med(:,3,:);
Ts1_input_name{46}=['Med_1'];
Ts1_input_name{47}=['Med_2'];
Ts1_input_name{48}=['Med_3'];
Ts1_input_name{49}=['Med_4'];
Ts1_input_name{50}=['Med_5'];
Ts_intup1(:,51:55)=LS_NPa(:,3,:);
Ts_input_name{51}=['NPa_1'];
Ts_input_name{52}=['NPa_2'];
Ts_input_name{53}=['NPa_3']; 
Ts_input_name{54}=['NPa_4'];
Ts_input_name{55}=['NPa_5'];
Ts1_intup1(:,51:55)=LS1_NPa(:,3,:);
Ts1_input_name{51}=['NPa_1'];
Ts1_input_name{52}=['NPa_2'];
Ts1_input_name{53}=['NPa_3'];
Ts1_input_name{54}=['NPa_4'];
Ts1_input_name{55}=['NPa_5'];
Ts_intup1(:,56:60)=LS_NGB(:,3,:);
Ts_input_name{56}=['NGB_1'];
Ts_input_name{57}=['NGB_2'];
Ts_input_name{58}=['NGB_3']; 
Ts_input_name{59}=['NGB_4'];
Ts_input_name{60}=['NGB_5']; 
Ts1_intup1(:,56:60)=LS1_NGB(:,3,:);
Ts1_input_name{56}=['NGB_1'];
Ts1_input_name{57}=['NGB_2'];
Ts1_input_name{58}=['NGB_3'];
Ts1_input_name{59}=['NGB_4'];
Ts1_input_name{60}=['NGB_5'];
Ts_intup1(:,61:65)=LS_NNAt(:,3,:);
Ts_input_name{61}=['NNAt_1'];
Ts_input_name{62}=['NNAt_2'];
Ts_input_name{63}=['NNAt_3']; 
Ts_input_name{64}=['NNAt_4'];
Ts_input_name{65}=['NNAt_5'];
Ts1_intup1(:,61:65)=LS1_NNAt(:,3,:);
Ts1_input_name{61}=['NNAt_1'];
Ts1_input_name{62}=['NNAt_2'];
Ts1_input_name{63}=['NNAt_3'];
Ts1_input_name{64}=['NNAt_4'];
Ts1_input_name{65}=['NNAt_5'];  
ir=90;
ss=65;
elseif mode==6
Ti_intup1(:,1:6)=LS_TEM(:,6,:);
Ti_input_name{1}=['TEM_1'];
Ti_input_name{2}=['TEM_2'];
Ti_input_name{3}=['TEM_3']; 
Ti_input_name{4}=['TEM_4'];
Ti_input_name{5}=['TEM_5'];
Ti_input_name{6}=['TEM_6']; 
Ti1_intup1(:,1:6)=LS1_TEM(:,6,:);
Ti1_input_name{1}=['TEM_1'];
Ti1_input_name{2}=['TEM_2'];
Ti1_input_name{3}=['TEM_3'];  
Ti1_input_name{4}=['TEM_4']; 
Ti1_input_name{5}=['TEM_5']; 
Ti1_input_name{6}=['TEM_6']; 
Ti_intup1(:,7:12)=LS_SAt(:,6,:);
Ti_input_name{7}=['SAt_1'];
Ti_input_name{8}=['SAt_2'];
Ti_input_name{9}=['SAt_3']; 
Ti_input_name{10}=['SAt_4'];
Ti_input_name{11}=['SAt_5'];
Ti_input_name{12}=['SAt_6']; 
Ti1_intup1(:,7:12)=LS1_SAt(:,6,:);
Ti1_input_name{7}=['SAt_1'];
Ti1_input_name{8}=['SAt_2'];
Ti1_input_name{9}=['SAt_3'];
Ti1_input_name{10}=['SAt_4'];
Ti1_input_name{11}=['SAt_5'];
Ti1_input_name{12}=['SAt_6'];
Ti_intup1(:,13:18)=LS_NAt(:,6,:);
Ti_input_name{13}=['NAt_1'];
Ti_input_name{14}=['NAt_2'];
Ti_input_name{15}=['NAt_3']; 
Ti_input_name{16}=['NAt_4'];
Ti_input_name{17}=['NAt_5'];
Ti_input_name{18}=['NAt_6'];
Ti1_intup1(:,13:18)=LS1_NAt(:,6,:);
Ti1_input_name{13}=['NAt_1'];
Ti1_input_name{14}=['NAt_2'];
Ti1_input_name{15}=['NAt_3']; 
Ti1_input_name{16}=['NAt_4'];
Ti1_input_name{17}=['NAt_5'];
Ti1_input_name{18}=['NAt_6'];  
Ti_intup1(:,19:24)=LS_SPa(:,6,:);
Ti_input_name{19}=['SPa_1'];
Ti_input_name{20}=['SPa_2'];
Ti_input_name{21}=['SPa_3']; 
Ti_input_name{22}=['SPa_4'];
Ti_input_name{23}=['SPa_5'];
Ti_input_name{24}=['SPa_6'];
Ti1_intup1(:,19:24)=LS1_SPa(:,6,:);
Ti1_input_name{19}=['SPa_1'];
Ti1_input_name{20}=['SPa_2'];
Ti1_input_name{21}=['SPa_3'];
Ti1_input_name{22}=['SPa_4'];
Ti1_input_name{23}=['SPa_5'];
Ti1_input_name{24}=['SPa_6'];
Ti_intup1(:,25:30)=LS_Baltic(:,6,:);
Ti_input_name{25}=['Baltic_1'];
Ti_input_name{26}=['Baltic_2'];
Ti_input_name{27}=['Baltic_3']; 
Ti_input_name{28}=['Baltic_4'];
Ti_input_name{29}=['Baltic_5'];
Ti_input_name{30}=['Baltic_6']; 
Ti1_intup1(:,25:30)=LS1_Baltic(:,6,:);
Ti1_input_name{25}=['Baltic_1'];
Ti1_input_name{26}=['Baltic_2'];
Ti1_input_name{27}=['Baltic_3'];
Ti1_input_name{28}=['Baltic_4'];
Ti1_input_name{29}=['Baltic_5'];
Ti1_input_name{30}=['Baltic_6'];
Ti_intup1(:,31:36)=LS_CPC_M(:,6,:);
Ti_input_name{31}=['CPC_M_1'];
Ti_input_name{32}=['CPC_M_2'];
Ti_input_name{33}=['CPC_M_3']; 
Ti_input_name{34}=['CPC_M_4'];
Ti_input_name{35}=['CPC_M_5'];
Ti_input_name{36}=['CPC_M_6']; 
Ti1_intup1(:,31:36)=LS1_CPC_M(:,6,:);
Ti1_input_name{31}=['CPC_M_1'];
Ti1_input_name{32}=['CPC_M_2'];
Ti1_input_name{33}=['CPC_M_3'];
Ti1_input_name{34}=['CPC_M_4'];
Ti1_input_name{35}=['CPC_M_5'];
Ti1_input_name{36}=['CPC_M_6'];
Ti_intup1(:,37:42)=LS_Black(:,6,:);
Ti_input_name{37}=['Black_1'];
Ti_input_name{38}=['Black_2'];
Ti_input_name{39}=['Black_3']; 
Ti_input_name{40}=['Black_4'];
Ti_input_name{41}=['Black_5'];
Ti_input_name{42}=['Black_6']; 
Ti1_intup1(:,37:42)=LS1_Black(:,6,:);
Ti1_input_name{37}=['Black_1'];
Ti1_input_name{38}=['Black_2'];
Ti1_input_name{39}=['Black_3'];
Ti1_input_name{40}=['Black_4'];
Ti1_input_name{41}=['Black_5'];
Ti1_input_name{42}=['Black_6'];
Ti_intup1(:,43:48)=LS_Hudson(:,6,:);
Ti_input_name{43}=['Hudson_1'];
Ti_input_name{44}=['Hudson_2'];
Ti_input_name{45}=['Hudson_3']; 
Ti_input_name{46}=['Hudson_4'];
Ti_input_name{47}=['Hudson_5'];
Ti_input_name{48}=['Hudson_6']; 
Ti1_intup1(:,43:48)=LS1_Hudson(:,6,:);
Ti1_input_name{43}=['Hudson_1'];
Ti1_input_name{44}=['Hudson_2'];
Ti1_input_name{45}=['Hudson_3'];
Ti1_input_name{46}=['Hudson_4'];
Ti1_input_name{47}=['Hudson_5'];
Ti1_input_name{48}=['Hudson_6'];
Ti_intup1(:,49:54)=LS_Ind(:,6,:);
Ti_input_name{49}=['Ind_1'];
Ti_input_name{50}=['Ind_2'];
Ti_input_name{51}=['Ind_3']; 
Ti_input_name{52}=['Ind_4'];
Ti_input_name{53}=['Ind_5'];
Ti_input_name{54}=['Ind_6']; 
Ti1_intup1(:,49:54)=LS1_Ind(:,6,:);
Ti1_input_name{49}=['Ind_1'];
Ti1_input_name{50}=['Ind_2'];
Ti1_input_name{51}=['Ind_3'];
Ti1_input_name{52}=['Ind_4'];
Ti1_input_name{53}=['Ind_5'];
Ti1_input_name{54}=['Ind_6'];
Ti_intup1(:,55:60)=LS_Med(:,6,:);
Ti_input_name{55}=['Med_1'];
Ti_input_name{56}=['Med_2'];
Ti_input_name{57}=['Med_3']; 
Ti_input_name{58}=['Med_4'];
Ti_input_name{59}=['Med_5'];
Ti_input_name{60}=['Med_6']; 
Ti1_intup1(:,55:60)=LS1_Med(:,6,:);
Ti1_input_name{55}=['Med_1'];
Ti1_input_name{56}=['Med_2'];
Ti1_input_name{57}=['Med_3'];
Ti1_input_name{58}=['Med_4'];
Ti1_input_name{59}=['Med_5'];
Ti1_input_name{60}=['Med_6'];
Ti_intup1(:,61:66)=LS_NPa(:,6,:);
Ti_input_name{61}=['NPa_1'];
Ti_input_name{62}=['NPa_2'];
Ti_input_name{63}=['NPa_3']; 
Ti_input_name{64}=['NPa_4'];
Ti_input_name{65}=['NPa_5'];
Ti_input_name{66}=['NPa_6']; 
Ti1_intup1(:,61:66)=LS1_NPa(:,6,:);
Ti1_input_name{61}=['NPa_1'];
Ti1_input_name{62}=['NPa_2'];
Ti1_input_name{63}=['NPa_3'];
Ti1_input_name{64}=['NPa_4'];
Ti1_input_name{65}=['NPa_5'];
Ti1_input_name{66}=['NPa_6'];
Ti_intup1(:,67:72)=LS_NGB(:,6,:);
Ti_input_name{67}=['NGB_1'];
Ti_input_name{68}=['NGB_2'];
Ti_input_name{69}=['NGB_3']; 
Ti_input_name{70}=['NGB_4'];
Ti_input_name{71}=['NGB_5'];
Ti_input_name{72}=['NGB_6']; 
Ti1_intup1(:,67:72)=LS1_NGB(:,6,:);
Ti1_input_name{67}=['NGB_1'];
Ti1_input_name{68}=['NGB_2'];
Ti1_input_name{69}=['NGB_3'];
Ti1_input_name{70}=['NGB_4'];
Ti1_input_name{71}=['NGB_5'];
Ti1_input_name{72}=['NGB_6'];
Ti_intup1(:,73:78)=LS_NNAt(:,6,:);
Ti_input_name{73}=['NNAt_1'];
Ti_input_name{74}=['NNAt_2'];
Ti_input_name{75}=['NNAt_3']; 
Ti_input_name{76}=['NNAt_4'];
Ti_input_name{77}=['NNAt_5'];
Ti_input_name{78}=['NNAt_6']; 
Ti1_intup1(:,73:78)=LS1_NNAt(:,6,:);
Ti1_input_name{73}=['NNAt_1'];
Ti1_input_name{74}=['NNAt_2'];
Ti1_input_name{75}=['NNAt_3'];
Ti1_input_name{76}=['NNAt_4'];
Ti1_input_name{77}=['NNAt_5'];
Ti1_input_name{78}=['NNAt_6'];
Ti_intup1(:,79:84)=LS_Pi_out(:,1,:);
Ti_input_name{79}=['CPC_11'];
Ti_input_name{80}=['CPC_12'];
Ti_input_name{81}=['CPC_13']; 
Ti_input_name{82}=['CPC_14'];
Ti_input_name{83}=['CPC_15'];
Ti_input_name{84}=['CPC_16']; 
Ti1_intup1(:,79:84)=LS1_Pi_out(:,1,:);
Ti1_input_name{79}=['CPC_11'];
Ti1_input_name{80}=['CPC_12'];
Ti1_input_name{81}=['CPC_13']; 
Ti1_input_name{82}=['CPC_14'];
Ti1_input_name{83}=['CPC_15'];
Ti1_input_name{84}=['CPC_16']; 
Ti_intup1(:,85:90)=LS_Pi_out(:,2,:);
Ti_input_name{85}=['CPC_21']; 
Ti_input_name{86}=['CPC_22']; 
Ti_input_name{87}=['CPC_23']; 
Ti_input_name{88}=['CPC_24']; 
Ti_input_name{89}=['CPC_25']; 
Ti_input_name{90}=['CPC_26']; 
Ti1_intup1(:,85:90)=LS1_Pi_out(:,2,:);
Ti1_input_name{85}=['CPC_21'];
Ti1_input_name{86}=['CPC_22'];
Ti1_input_name{87}=['CPC_23']; 
Ti1_input_name{88}=['CPC_24'];
Ti1_input_name{89}=['CPC_25'];
Ti1_input_name{90}=['CPC_26']; 
Ti_intup1(:,91:96)=LS_Pi_out(:,3,:);
Ti_input_name{91}=['CPC_31']; 
Ti_input_name{92}=['CPC_32']; 
Ti_input_name{93}=['CPC_33']; 
Ti_input_name{94}=['CPC_34']; 
Ti_input_name{95}=['CPC_35']; 
Ti_input_name{96}=['CPC_36']; 
Ti1_intup1(:,91:96)=LS1_Pi_out(:,3,:);
Ti1_input_name{91}=['CPC_31'];
Ti1_input_name{92}=['CPC_32'];
Ti1_input_name{93}=['CPC_33']; 
Ti1_input_name{94}=['CPC_34'];
Ti1_input_name{95}=['CPC_35'];
Ti1_input_name{96}=['CPC_36']; 
Ti_intup1(:,97:102)=LS_Pi_out(:,4,:);
Ti_input_name{97}=['CPC_41'];
Ti_input_name{98}=['CPC_42'];
Ti_input_name{99}=['CPC_43']; 
Ti_input_name{100}=['CPC_44'];
Ti_input_name{101}=['CPC_45'];
Ti_input_name{102}=['CPC_46']; 
Ti1_intup1(:,97:102)=LS1_Pi_out(:,4,:);
Ti1_input_name{97}=['CPC_41'];
Ti1_input_name{98}=['CPC_42'];
Ti1_input_name{99}=['CPC_43']; 
Ti1_input_name{100}=['CPC_44'];
Ti1_input_name{101}=['CPC_45'];
Ti1_input_name{102}=['CPC_46'];  
Ti_intup1(:,103:108)=LS_Pi_out(:,5,:);
Ti_input_name{103}=['CPC_51']; 
Ti_input_name{104}=['CPC_52']; 
Ti_input_name{105}=['CPC_53']; 
Ti_input_name{106}=['CPC_54']; 
Ti_input_name{107}=['CPC_55']; 
Ti_input_name{108}=['CPC_56']; 
Ti1_intup1(:,103:108)=LS1_Pi_out(:,5,:);
Ti1_input_name{103}=['CPC_51'];
Ti1_input_name{104}=['CPC_52'];
Ti1_input_name{105}=['CPC_53']; 
Ti1_input_name{106}=['CPC_54'];
Ti1_input_name{107}=['CPC_55'];
Ti1_input_name{108}=['CPC_56']; 
Ti_intup1(:,109:114)=LS_Pi_out(:,6,:);
Ti_input_name{109}=['CPC_61']; 
Ti_input_name{110}=['CPC_62']; 
Ti_input_name{111}=['CPC_63']; 
Ti_input_name{112}=['CPC_64']; 
Ti_input_name{113}=['CPC_65']; 
Ti_input_name{114}=['CPC_66']; 
Ti1_intup1(:,109:114)=LS1_Pi_out(:,6,:);
Ti1_input_name{109}=['CPC_61']; 
Ti1_input_name{110}=['CPC_62']; 
Ti1_input_name{111}=['CPC_63']; 
Ti1_input_name{112}=['CPC_64']; 
Ti1_input_name{113}=['CPC_65']; 
Ti1_input_name{114}=['CPC_66'];    
% % %*******************************
Tr_intup1(:,1:6)=LS_TEM(:,7,:);     
Tr_input_name{1}=['TEM_1'];         
Tr_input_name{2}=['TEM_2'];         
Tr_input_name{3}=['TEM_3'];         
Tr_input_name{4}=['TEM_4'];         
Tr_input_name{5}=['TEM_5'];         
Tr_input_name{6}=['TEM_6'];         
Tr1_intup1(:,1:6)=LS1_TEM(:,7,:);   
Tr1_input_name{1}=['TEM_1'];        
Tr1_input_name{2}=['TEM_2'];        
Tr1_input_name{3}=['TEM_3'];        
Tr1_input_name{4}=['TEM_4'];        
Tr1_input_name{5}=['TEM_5'];        
Tr1_input_name{6}=['TEM_6'];        
Tr_intup1(:,7:12)=LS_SAt(:,7,:);    
Tr_input_name{7}=['SAt_1'];         
Tr_input_name{8}=['SAt_2'];         
Tr_input_name{9}=['SAt_3'];         
Tr_input_name{10}=['SAt_4'];        
Tr_input_name{11}=['SAt_5'];        
Tr_input_name{12}=['SAt_6'];        
Tr1_intup1(:,7:12)=LS1_SAt(:,7,:);  
Tr1_input_name{7}=['SAt_1'];        
Tr1_input_name{8}=['SAt_2'];        
Tr1_input_name{9}=['SAt_3'];        
Tr1_input_name{10}=['SAt_4'];       
Tr1_input_name{11}=['SAt_5'];       
Tr1_input_name{12}=['SAt_6'];       
Tr_intup1(:,13:18)=LS_NAt(:,7,:);   
Tr_input_name{13}=['NAt_1'];        
Tr_input_name{14}=['NAt_2'];        
Tr_input_name{15}=['NAt_3'];        
Tr_input_name{16}=['NAt_4'];        
Tr_input_name{17}=['NAt_5'];        
Tr_input_name{18}=['NAt_6'];        
Tr1_intup1(:,13:18)=LS1_NAt(:,7,:); 
Tr1_input_name{13}=['NAt_1'];       
Tr1_input_name{14}=['NAt_2'];       
Tr1_input_name{15}=['NAt_3'];       
Tr1_input_name{16}=['NAt_4'];       
Tr1_input_name{17}=['NAt_5'];       
Tr1_input_name{18}=['NAt_6'];       
Tr_intup1(:,19:24)=LS_SPa(:,7,:);   
Tr_input_name{19}=['SPa_1'];        
Tr_input_name{20}=['SPa_2'];        
Tr_input_name{21}=['SPa_3'];        
Tr_input_name{22}=['SPa_4'];        
Tr_input_name{23}=['SPa_5'];        
Tr_input_name{24}=['SPa_6'];        
Tr1_intup1(:,19:24)=LS1_SPa(:,7,:); 
Tr1_input_name{19}=['SPa_1'];       
Tr1_input_name{20}=['SPa_2'];       
Tr1_input_name{21}=['SPa_3'];       
Tr1_input_name{22}=['SPa_4'];       
Tr1_input_name{23}=['SPa_5'];       
Tr1_input_name{24}=['SPa_6'];       
Tr_intup1(:,25:30)=LS_Baltic(:,7,:);
Tr_input_name{25}=['Baltic_1'];     
Tr_input_name{26}=['Baltic_2'];     
Tr_input_name{27}=['Baltic_3'];     
Tr_input_name{28}=['Baltic_4'];     
Tr_input_name{29}=['Baltic_5'];     
Tr_input_name{30}=['Baltic_6'];     
Tr1_intup1(:,25:30)=LS1_Baltic(:,7,:); 
Tr1_input_name{25}=['Baltic_1'];    
Tr1_input_name{26}=['Baltic_2'];    
Tr1_input_name{27}=['Baltic_3'];    
Tr1_input_name{28}=['Baltic_4'];    
Tr1_input_name{29}=['Baltic_5'];    
Tr1_input_name{30}=['Baltic_6'];    
Tr_intup1(:,31:36)=LS_CPC_M(:,7,:); 
Tr_input_name{31}=['CPC_M_1'];      
Tr_input_name{32}=['CPC_M_2'];      
Tr_input_name{33}=['CPC_M_3'];      
Tr_input_name{34}=['CPC_M_4'];      
Tr_input_name{35}=['CPC_M_5'];      
Tr_input_name{36}=['CPC_M_6'];      
Tr1_intup1(:,31:36)=LS1_CPC_M(:,6,:);
Tr1_input_name{31}=['CPC_M_1'];     
Tr1_input_name{32}=['CPC_M_2'];     
Tr1_input_name{33}=['CPC_M_3'];     
Tr1_input_name{34}=['CPC_M_4'];     
Tr1_input_name{35}=['CPC_M_5'];     
Tr1_input_name{36}=['CPC_M_6'];     
Tr_intup1(:,37:42)=LS_Black(:,7,:); 
Tr_input_name{37}=['Black_1'];      
Tr_input_name{38}=['Black_2'];      
Tr_input_name{39}=['Black_3'];      
Tr_input_name{40}=['Black_4'];      
Tr_input_name{41}=['Black_5'];      
Tr_input_name{42}=['Black_6'];      
Tr1_intup1(:,37:42)=LS1_Black(:,7,:);
Tr1_input_name{37}=['Black_1'];     
Tr1_input_name{38}=['Black_2'];     
Tr1_input_name{39}=['Black_3'];     
Tr1_input_name{40}=['Black_4'];     
Tr1_input_name{41}=['Black_5'];     
Tr1_input_name{42}=['Black_6'];     
Tr_intup1(:,43:48)=LS_Hudson(:,7,:);
Tr_input_name{43}=['Hudson_1'];     
Tr_input_name{44}=['Hudson_2'];     
Tr_input_name{45}=['Hudson_3'];     
Tr_input_name{46}=['Hudson_4'];     
Tr_input_name{47}=['Hudson_5'];     
Tr_input_name{48}=['Hudson_6'];     
Tr1_intup1(:,43:48)=LS1_Hudson(:,7,:);
Tr1_input_name{43}=['Hudson_1'];    
Tr1_input_name{44}=['Hudson_2'];    
Tr1_input_name{45}=['Hudson_3'];    
Tr1_input_name{46}=['Hudson_4'];    
Tr1_input_name{47}=['Hudson_5'];    
Tr1_input_name{48}=['Hudson_6'];    
Tr_intup1(:,49:54)=LS_Ind(:,7,:);   
Tr_input_name{49}=['Ind_1'];        
Tr_input_name{50}=['Ind_2'];        
Tr_input_name{51}=['Ind_3'];        
Tr_input_name{52}=['Ind_4'];        
Tr_input_name{53}=['Ind_5'];        
Tr_input_name{54}=['Ind_6'];        
Tr1_intup1(:,49:54)=LS1_Ind(:,7,:); 
Tr1_input_name{49}=['Ind_1'];       
Tr1_input_name{50}=['Ind_2'];       
Tr1_input_name{51}=['Ind_3'];       
Tr1_input_name{52}=['Ind_4'];       
Tr1_input_name{53}=['Ind_5'];       
Tr1_input_name{54}=['Ind_6'];       
Tr_intup1(:,55:60)=LS_Med(:,7,:);   
Tr_input_name{55}=['Med_1'];        
Tr_input_name{56}=['Med_2'];        
Tr_input_name{57}=['Med_3'];        
Tr_input_name{58}=['Med_4'];        
Tr_input_name{59}=['Med_5'];        
Tr_input_name{60}=['Med_6'];        
Tr1_intup1(:,55:60)=LS1_Med(:,7,:); 
Tr1_input_name{55}=['Med_1'];       
Tr1_input_name{56}=['Med_2'];       
Tr1_input_name{57}=['Med_3'];       
Tr1_input_name{58}=['Med_4'];       
Tr1_input_name{59}=['Med_5'];       
Tr1_input_name{60}=['Med_6'];       
Tr_intup1(:,61:66)=LS_NPa(:,7,:);   
Tr_input_name{61}=['NPa_1'];        
Tr_input_name{62}=['NPa_2'];        
Tr_input_name{63}=['NPa_3'];        
Tr_input_name{64}=['NPa_4'];        
Tr_input_name{65}=['NPa_5'];        
Tr_input_name{66}=['NPa_6'];        
Tr1_intup1(:,61:66)=LS1_NPa(:,7,:); 
Tr1_input_name{61}=['NPa_1'];       
Tr1_input_name{62}=['NPa_2'];       
Tr1_input_name{63}=['NPa_3'];       
Tr1_input_name{64}=['NPa_4'];       
Tr1_input_name{65}=['NPa_5'];       
Tr1_input_name{66}=['NPa_6'];       
Tr_intup1(:,67:72)=LS_NGB(:,7,:);   
Tr_input_name{67}=['NGB_1'];        
Tr_input_name{68}=['NGB_2'];        
Tr_input_name{69}=['NGB_3'];        
Tr_input_name{70}=['NGB_4'];        
Tr_input_name{71}=['NGB_5'];        
Tr_input_name{72}=['NGB_6'];        
Tr1_intup1(:,67:72)=LS1_NGB(:,7,:); 
Tr1_input_name{67}=['NGB_1'];       
Tr1_input_name{68}=['NGB_2'];       
Tr1_input_name{69}=['NGB_3'];       
Tr1_input_name{70}=['NGB_4'];       
Tr1_input_name{71}=['NGB_5'];       
Tr1_input_name{72}=['NGB_6'];       
Tr_intup1(:,73:78)=LS_NNAt(:,7,:);  
Tr_input_name{73}=['NNAt_1'];       
Tr_input_name{74}=['NNAt_2'];       
Tr_input_name{75}=['NNAt_3'];       
Tr_input_name{76}=['NNAt_4'];       
Tr_input_name{77}=['NNAt_5'];       
Tr_input_name{78}=['NNAt_6'];       
Tr1_intup1(:,73:78)=LS1_NNAt(:,7,:);
Tr1_input_name{73}=['NNAt_1'];      
Tr1_input_name{74}=['NNAt_2'];      
Tr1_input_name{75}=['NNAt_3'];      
Tr1_input_name{76}=['NNAt_4'];      
Tr1_input_name{77}=['NNAt_5'];      
Tr1_input_name{78}=['NNAt_6'];      
Tr_intup1(:,79:84)=LS_P_out(:,1,:); 
Tr_input_name{79}=['CPC_11'];       
Tr_input_name{80}=['CPC_12'];       
Tr_input_name{81}=['CPC_13'];       
Tr_input_name{82}=['CPC_14'];       
Tr_input_name{83}=['CPC_15'];       
Tr_input_name{84}=['CPC_16'];       
Tr1_intup1(:,79:84)=LS1_P_out(:,1,:);
Tr1_input_name{79}=['CPC_11'];      
Tr1_input_name{80}=['CPC_12'];      
Tr1_input_name{81}=['CPC_13'];      
Tr1_input_name{82}=['CPC_14'];      
Tr1_input_name{83}=['CPC_15'];      
Tr1_input_name{84}=['CPC_16'];      
Tr_intup1(:,85:90)=LS_P_out(:,2,:); 
Tr_input_name{85}=['CPC_21'];       
Tr_input_name{86}=['CPC_22'];       
Tr_input_name{87}=['CPC_23'];       
Tr_input_name{88}=['CPC_24'];       
Tr_input_name{89}=['CPC_25'];       
Tr_input_name{90}=['CPC_26'];       
Tr1_intup1(:,85:90)=LS1_P_out(:,2,:);
Tr1_input_name{85}=['CPC_21'];      
Tr1_input_name{86}=['CPC_22'];      
Tr1_input_name{87}=['CPC_23'];      
Tr1_input_name{88}=['CPC_24'];      
Tr1_input_name{89}=['CPC_25'];      
Tr1_input_name{90}=['CPC_26'];      
Tr_intup1(:,91:96)=LS_P_out(:,3,:); 
Tr_input_name{91}=['CPC_31'];       
Tr_input_name{92}=['CPC_32'];       
Tr_input_name{93}=['CPC_33'];       
Tr_input_name{94}=['CPC_34'];       
Tr_input_name{95}=['CPC_35'];       
Tr_input_name{96}=['CPC_36'];       
Tr1_intup1(:,91:96)=LS1_P_out(:,3,:);
Tr1_input_name{91}=['CPC_31'];      
Tr1_input_name{92}=['CPC_32'];      
Tr1_input_name{93}=['CPC_33'];      
Tr1_input_name{94}=['CPC_34'];      
Tr1_input_name{95}=['CPC_35'];      
Tr1_input_name{96}=['CPC_36'];      
Tr_intup1(:,97:102)=LS_P_out(:,4,:);
Tr_input_name{97}=['CPC_41'];       
Tr_input_name{98}=['CPC_42'];       
Tr_input_name{99}=['CPC_43'];       
Tr_input_name{100}=['CPC_44'];      
Tr_input_name{101}=['CPC_45'];      
Tr_input_name{102}=['CPC_46'];      
Tr1_intup1(:,97:102)=LS1_P_out(:,4,:);
Tr1_input_name{97}=['CPC_41'];      
Tr1_input_name{98}=['CPC_42'];      
Tr1_input_name{99}=['CPC_43'];      
Tr1_input_name{100}=['CPC_44'];     
Tr1_input_name{101}=['CPC_45'];     
Tr1_input_name{102}=['CPC_46'];     
Tr_intup1(:,103:108)=LS_P_out(:,5,:);
Tr_input_name{103}=['CPC_51'];      
Tr_input_name{104}=['CPC_52'];      
Tr_input_name{105}=['CPC_53'];      
Tr_input_name{106}=['CPC_54'];      
Tr_input_name{107}=['CPC_55'];      
Tr_input_name{108}=['CPC_56'];      
Tr1_intup1(:,103:108)=LS1_P_out(:,5,:);
Tr1_input_name{103}=['CPC_51'];     
Tr1_input_name{104}=['CPC_52'];     
Tr1_input_name{105}=['CPC_53'];     
Tr1_input_name{106}=['CPC_54'];     
Tr1_input_name{107}=['CPC_55'];     
Tr1_input_name{108}=['CPC_56'];     
Tr_intup1(:,109:114)=LS_P_out(:,6,:);
Tr_input_name{109}=['CPC_61'];      
Tr_input_name{110}=['CPC_62'];      
Tr_input_name{111}=['CPC_63'];      
Tr_input_name{112}=['CPC_64'];      
Tr_input_name{113}=['CPC_65'];      
Tr_input_name{114}=['CPC_66'];      
Tr1_intup1(:,109:114)=LS1_P_out(:,6,:);
Tr1_input_name{109}=['CPC_61'];     
Tr1_input_name{110}=['CPC_62'];     
Tr1_input_name{111}=['CPC_63'];     
Tr1_input_name{112}=['CPC_64'];     
Tr1_input_name{113}=['CPC_65'];     
Tr1_input_name{114}=['CPC_66'];     
% % %*******************************
Ts_intup1(:,1:6)=LS_TEM(:,3,:);     
Ts_input_name{1}=['TEM_1'];         
Ts_input_name{2}=['TEM_2'];         
Ts_input_name{3}=['TEM_3'];         
Ts_input_name{4}=['TEM_4'];         
Ts_input_name{5}=['TEM_5'];         
Ts_input_name{6}=['TEM_6'];         
Ts1_intup1(:,1:6)=LS1_TEM(:,3,:);   
Ts1_input_name{1}=['TEM_1'];        
Ts1_input_name{2}=['TEM_2'];        
Ts1_input_name{3}=['TEM_3'];        
Ts1_input_name{4}=['TEM_4'];        
Ts1_input_name{5}=['TEM_5'];        
Ts1_input_name{6}=['TEM_6'];        
Ts_intup1(:,7:12)=LS_SAt(:,3,:);    
Ts_input_name{7}=['SAt_1'];         
Ts_input_name{8}=['SAt_2'];         
Ts_input_name{9}=['SAt_3'];         
Ts_input_name{10}=['SAt_4'];        
Ts_input_name{11}=['SAt_5'];        
Ts_input_name{12}=['SAt_6'];        
Ts1_intup1(:,7:12)=LS1_SAt(:,3,:);  
Ts1_input_name{7}=['SAt_1'];        
Ts1_input_name{8}=['SAt_2'];        
Ts1_input_name{9}=['SAt_3'];        
Ts1_input_name{10}=['SAt_4'];       
Ts1_input_name{11}=['SAt_5'];       
Ts1_input_name{12}=['SAt_6'];       
Ts_intup1(:,13:18)=LS_NAt(:,3,:);   
Ts_input_name{13}=['NAt_1'];        
Ts_input_name{14}=['NAt_2'];        
Ts_input_name{15}=['NAt_3'];        
Ts_input_name{16}=['NAt_4'];        
Ts_input_name{17}=['NAt_5'];        
Ts_input_name{18}=['NAt_6'];        
Ts1_intup1(:,13:18)=LS1_NAt(:,3,:); 
Ts1_input_name{13}=['NAt_1'];       
Ts1_input_name{14}=['NAt_2'];       
Ts1_input_name{15}=['NAt_3'];       
Ts1_input_name{16}=['NAt_4'];       
Ts1_input_name{17}=['NAt_5'];       
Ts1_input_name{18}=['NAt_6'];       
Ts_intup1(:,19:24)=LS_SPa(:,3,:);   
Ts_input_name{19}=['SPa_1'];        
Ts_input_name{20}=['SPa_2'];        
Ts_input_name{21}=['SPa_3'];        
Ts_input_name{22}=['SPa_4'];        
Ts_input_name{23}=['SPa_5'];        
Ts_input_name{24}=['SPa_6'];        
Ts1_intup1(:,19:24)=LS1_SPa(:,3,:); 
Ts1_input_name{19}=['SPa_1'];       
Ts1_input_name{20}=['SPa_2'];       
Ts1_input_name{21}=['SPa_3'];       
Ts1_input_name{22}=['SPa_4'];       
Ts1_input_name{23}=['SPa_5'];       
Ts1_input_name{24}=['SPa_6'];       
Ts_intup1(:,25:30)=LS_Baltic(:,3,:);
Ts_input_name{25}=['Baltic_1'];     
Ts_input_name{26}=['Baltic_2'];     
Ts_input_name{27}=['Baltic_3'];     
Ts_input_name{28}=['Baltic_4'];     
Ts_input_name{29}=['Baltic_5'];     
Ts_input_name{30}=['Baltic_6'];     
Ts1_intup1(:,25:30)=LS1_Baltic(:,3,:);
Ts1_input_name{25}=['Baltic_1'];    
Ts1_input_name{26}=['Baltic_2'];    
Ts1_input_name{27}=['Baltic_3'];    
Ts1_input_name{28}=['Baltic_4'];    
Ts1_input_name{29}=['Baltic_5'];    
Ts1_input_name{30}=['Baltic_6'];    
Ts_intup1(:,31:36)=LS_CPC_M(:,3,:); 
Ts_input_name{31}=['CPC_M_1'];      
Ts_input_name{32}=['CPC_M_2'];      
Ts_input_name{33}=['CPC_M_3'];      
Ts_input_name{34}=['CPC_M_4'];      
Ts_input_name{35}=['CPC_M_5'];      
Ts_input_name{36}=['CPC_M_6'];      
Ts1_intup1(:,31:36)=LS1_CPC_M(:,3,:);
Ts1_input_name{31}=['CPC_M_1'];     
Ts1_input_name{32}=['CPC_M_2'];     
Ts1_input_name{33}=['CPC_M_3'];     
Ts1_input_name{34}=['CPC_M_4'];     
Ts1_input_name{35}=['CPC_M_5'];     
Ts1_input_name{36}=['CPC_M_6'];     
Ts_intup1(:,37:42)=LS_Black(:,3,:); 
Ts_input_name{37}=['Black_1'];      
Ts_input_name{38}=['Black_2'];      
Ts_input_name{39}=['Black_3'];      
Ts_input_name{40}=['Black_4'];      
Ts_input_name{41}=['Black_5'];      
Ts_input_name{42}=['Black_6'];      
Ts1_intup1(:,37:42)=LS1_Black(:,3,:);
Ts1_input_name{37}=['Black_1'];     
Ts1_input_name{38}=['Black_2'];     
Ts1_input_name{39}=['Black_3'];     
Ts1_input_name{40}=['Black_4'];     
Ts1_input_name{41}=['Black_5'];     
Ts1_input_name{42}=['Black_6'];     
Ts_intup1(:,43:48)=LS_Hudson(:,3,:);
Ts_input_name{43}=['Hudson_1'];     
Ts_input_name{44}=['Hudson_2'];     
Ts_input_name{45}=['Hudson_3'];     
Ts_input_name{46}=['Hudson_4'];     
Ts_input_name{47}=['Hudson_5'];     
Ts_input_name{48}=['Hudson_6'];     
Ts1_intup1(:,43:48)=LS1_Hudson(:,3,:);
Ts1_input_name{43}=['Hudson_1'];    
Ts1_input_name{44}=['Hudson_2'];    
Ts1_input_name{45}=['Hudson_3'];    
Ts1_input_name{46}=['Hudson_4'];    
Ts1_input_name{47}=['Hudson_5'];    
Ts1_input_name{48}=['Hudson_6'];    
Ts_intup1(:,49:54)=LS_Ind(:,3,:);   
Ts_input_name{49}=['Ind_1'];        
Ts_input_name{50}=['Ind_2'];        
Ts_input_name{51}=['Ind_3'];        
Ts_input_name{52}=['Ind_4'];        
Ts_input_name{53}=['Ind_5'];        
Ts_input_name{54}=['Ind_6'];        
Ts1_intup1(:,49:54)=LS1_Ind(:,3,:); 
Ts1_input_name{49}=['Ind_1'];       
Ts1_input_name{50}=['Ind_2'];       
Ts1_input_name{51}=['Ind_3'];       
Ts1_input_name{52}=['Ind_4'];       
Ts1_input_name{53}=['Ind_5'];       
Ts1_input_name{54}=['Ind_6'];       
Ts_intup1(:,55:60)=LS_Med(:,3,:);   
Ts_input_name{55}=['Med_1'];        
Ts_input_name{56}=['Med_2'];        
Ts_input_name{57}=['Med_3'];        
Ts_input_name{58}=['Med_4'];        
Ts_input_name{59}=['Med_5'];        
Ts_input_name{60}=['Med_6'];        
Ts1_intup1(:,55:60)=LS1_Med(:,3,:); 
Ts1_input_name{55}=['Med_1'];       
Ts1_input_name{56}=['Med_2'];       
Ts1_input_name{57}=['Med_3'];       
Ts1_input_name{58}=['Med_4'];       
Ts1_input_name{59}=['Med_5'];       
Ts1_input_name{60}=['Med_6'];       
Ts_intup1(:,61:66)=LS_NPa(:,3,:);   
Ts_input_name{61}=['NPa_1'];        
Ts_input_name{62}=['NPa_2'];        
Ts_input_name{63}=['NPa_3'];        
Ts_input_name{64}=['NPa_4'];        
Ts_input_name{65}=['NPa_5'];        
Ts_input_name{66}=['NPa_6'];        
Ts1_intup1(:,61:66)=LS1_NPa(:,3,:); 
Ts1_input_name{61}=['NPa_1'];       
Ts1_input_name{62}=['NPa_2'];       
Ts1_input_name{63}=['NPa_3'];       
Ts1_input_name{64}=['NPa_4'];       
Ts1_input_name{65}=['NPa_5'];       
Ts1_input_name{66}=['NPa_6'];       
Ts_intup1(:,67:72)=LS_NGB(:,3,:);   
Ts_input_name{67}=['NGB_1'];        
Ts_input_name{68}=['NGB_2'];        
Ts_input_name{69}=['NGB_3'];        
Ts_input_name{70}=['NGB_4'];        
Ts_input_name{71}=['NGB_5'];        
Ts_input_name{72}=['NGB_6'];        
Ts1_intup1(:,67:72)=LS1_NGB(:,3,:); 
Ts1_input_name{67}=['NGB_1'];       
Ts1_input_name{68}=['NGB_2'];       
Ts1_input_name{69}=['NGB_3'];       
Ts1_input_name{70}=['NGB_4'];       
Ts1_input_name{71}=['NGB_5'];       
Ts1_input_name{72}=['NGB_6'];       
Ts_intup1(:,73:78)=LS_NNAt(:,3,:);  
Ts_input_name{73}=['NNAt_1'];       
Ts_input_name{74}=['NNAt_2'];       
Ts_input_name{75}=['NNAt_3'];       
Ts_input_name{76}=['NNAt_4'];       
Ts_input_name{77}=['NNAt_5'];       
Ts_input_name{78}=['NNAt_6'];       
Ts1_intup1(:,73:78)=LS1_NNAt(:,3,:);
Ts1_input_name{73}=['NNAt_1'];      
Ts1_input_name{74}=['NNAt_2'];      
Ts1_input_name{75}=['NNAt_3'];      
Ts1_input_name{76}=['NNAt_4'];      
Ts1_input_name{77}=['NNAt_5'];      
Ts1_input_name{78}=['NNAt_6'];  
ir=114;
ss=78;
elseif mode==7
Ti_intup1(:,1:7)=LS_TEM(:,6,:);
Ti_input_name{1}=['TEM_1'];
Ti_input_name{2}=['TEM_2'];
Ti_input_name{3}=['TEM_3']; 
Ti_input_name{4}=['TEM_4'];
Ti_input_name{5}=['TEM_5'];
Ti_input_name{6}=['TEM_6']; 
Ti_input_name{7}=['TEM_7'];
Ti1_intup1(:,1:7)=LS1_TEM(:,6,:);
Ti1_input_name{1}=['TEM_1'];
Ti1_input_name{2}=['TEM_2'];
Ti1_input_name{3}=['TEM_3'];  
Ti1_input_name{4}=['TEM_4']; 
Ti1_input_name{5}=['TEM_5']; 
Ti1_input_name{6}=['TEM_6']; 
Ti1_input_name{7}=['TEM_7']; 
Ti_intup1(:,8:14)=LS_SAt(:,6,:);
Ti_input_name{8}=['SAt_1'];
Ti_input_name{9}=['SAt_2'];
Ti_input_name{10}=['SAt_3']; 
Ti_input_name{11}=['SAt_4'];
Ti_input_name{12}=['SAt_5'];
Ti_input_name{13}=['SAt_6']; 
Ti_input_name{14}=['SAt_7'];
Ti1_intup1(:,8:14)=LS1_SAt(:,6,:);
Ti1_input_name{8}=['SAt_1'];
Ti1_input_name{9}=['SAt_2'];
Ti1_input_name{10}=['SAt_3'];
Ti1_input_name{11}=['SAt_4'];
Ti1_input_name{12}=['SAt_5'];
Ti1_input_name{13}=['SAt_6'];
Ti1_input_name{14}=['SAt_7'];
Ti_intup1(:,15:21)=LS_NAt(:,6,:);
Ti_input_name{15}=['NAt_1'];
Ti_input_name{16}=['NAt_2'];
Ti_input_name{17}=['NAt_3']; 
Ti_input_name{18}=['NAt_4'];
Ti_input_name{19}=['NAt_5'];
Ti_input_name{20}=['NAt_6'];
Ti_input_name{21}=['NAt_7'];
Ti1_intup1(:,15:21)=LS1_NAt(:,6,:);
Ti1_input_name{15}=['NAt_1'];
Ti1_input_name{16}=['NAt_2'];
Ti1_input_name{17}=['NAt_3']; 
Ti1_input_name{18}=['NAt_4'];
Ti1_input_name{19}=['NAt_5'];
Ti1_input_name{20}=['NAt_6']; 
Ti1_input_name{21}=['NAt_7'];  
Ti_intup1(:,22:28)=LS_SPa(:,6,:);
Ti_input_name{22}=['SPa_1'];
Ti_input_name{23}=['SPa_2'];
Ti_input_name{24}=['SPa_3']; 
Ti_input_name{25}=['SPa_4'];
Ti_input_name{26}=['SPa_5'];
Ti_input_name{27}=['SPa_6'];
Ti_input_name{28}=['SPa_7'];
Ti1_intup1(:,22:28)=LS1_SPa(:,6,:);
Ti1_input_name{22}=['SPa_1'];
Ti1_input_name{23}=['SPa_2'];
Ti1_input_name{24}=['SPa_3'];
Ti1_input_name{25}=['SPa_4'];
Ti1_input_name{26}=['SPa_5'];
Ti1_input_name{27}=['SPa_6'];
Ti1_input_name{28}=['SPa_7'];
Ti_intup1(:,29:35)=LS_Baltic(:,6,:);
Ti_input_name{29}=['Baltic_1'];
Ti_input_name{30}=['Baltic_2'];
Ti_input_name{31}=['Baltic_3']; 
Ti_input_name{32}=['Baltic_4'];
Ti_input_name{33}=['Baltic_5'];
Ti_input_name{34}=['Baltic_6']; 
Ti_input_name{35}=['Baltic_7'];
Ti1_intup1(:,29:35)=LS1_Baltic(:,6,:);
Ti1_input_name{29}=['Baltic_1'];
Ti1_input_name{30}=['Baltic_2'];
Ti1_input_name{31}=['Baltic_3'];
Ti1_input_name{32}=['Baltic_4'];
Ti1_input_name{33}=['Baltic_5'];
Ti1_input_name{34}=['Baltic_6'];
Ti1_input_name{35}=['Baltic_7'];
Ti_intup1(:,36:42)=LS_CPC_M(:,6,:);
Ti_input_name{36}=['CPC_M_1'];
Ti_input_name{37}=['CPC_M_2'];
Ti_input_name{38}=['CPC_M_3']; 
Ti_input_name{39}=['CPC_M_4'];
Ti_input_name{40}=['CPC_M_5'];
Ti_input_name{41}=['CPC_M_6']; 
Ti_input_name{42}=['CPC_M_7'];
Ti1_intup1(:,36:42)=LS1_CPC_M(:,6,:);
Ti1_input_name{36}=['CPC_M_1'];
Ti1_input_name{37}=['CPC_M_2'];
Ti1_input_name{38}=['CPC_M_3'];
Ti1_input_name{39}=['CPC_M_4'];
Ti1_input_name{40}=['CPC_M_5'];
Ti1_input_name{41}=['CPC_M_6'];
Ti1_input_name{42}=['CPC_M_7'];
Ti_intup1(:,43:49)=LS_Black(:,6,:);
Ti_input_name{43}=['Black_1'];
Ti_input_name{44}=['Black_2'];
Ti_input_name{45}=['Black_3']; 
Ti_input_name{46}=['Black_4'];
Ti_input_name{47}=['Black_5'];
Ti_input_name{48}=['Black_6']; 
Ti_input_name{49}=['Black_7']; 
Ti1_intup1(:,43:49)=LS1_Black(:,6,:);
Ti1_input_name{43}=['Black_1'];
Ti1_input_name{44}=['Black_2'];
Ti1_input_name{45}=['Black_3'];
Ti1_input_name{46}=['Black_4'];
Ti1_input_name{47}=['Black_5'];
Ti1_input_name{48}=['Black_6'];
Ti1_input_name{49}=['Black_7'];
Ti_intup1(:,50:56)=LS_Hudson(:,6,:);
Ti_input_name{50}=['Hudson_1'];
Ti_input_name{51}=['Hudson_2'];
Ti_input_name{52}=['Hudson_3']; 
Ti_input_name{53}=['Hudson_4'];
Ti_input_name{54}=['Hudson_5'];
Ti_input_name{55}=['Hudson_6']; 
Ti_input_name{56}=['Hudson_7'];
Ti1_intup1(:,50:56)=LS1_Hudson(:,6,:);
Ti1_input_name{50}=['Hudson_1'];
Ti1_input_name{51}=['Hudson_2'];
Ti1_input_name{52}=['Hudson_3'];
Ti1_input_name{53}=['Hudson_4'];
Ti1_input_name{54}=['Hudson_5'];
Ti1_input_name{55}=['Hudson_6'];
Ti1_input_name{56}=['Hudson_7'];
Ti_intup1(:,57:63)=LS_Ind(:,6,:);
Ti_input_name{57}=['Ind_1'];
Ti_input_name{58}=['Ind_2'];
Ti_input_name{59}=['Ind_3']; 
Ti_input_name{60}=['Ind_4'];
Ti_input_name{61}=['Ind_5'];
Ti_input_name{62}=['Ind_6']; 
Ti_input_name{63}=['Ind_7'];
Ti1_intup1(:,57:63)=LS1_Ind(:,6,:);
Ti1_input_name{57}=['Ind_1'];
Ti1_input_name{58}=['Ind_2'];
Ti1_input_name{59}=['Ind_3'];
Ti1_input_name{60}=['Ind_4'];
Ti1_input_name{61}=['Ind_5'];
Ti1_input_name{62}=['Ind_6'];
Ti1_input_name{63}=['Ind_7'];
Ti_intup1(:,64:70)=LS_Med(:,6,:);
Ti_input_name{64}=['Med_1'];
Ti_input_name{65}=['Med_2'];
Ti_input_name{66}=['Med_3']; 
Ti_input_name{67}=['Med_4'];
Ti_input_name{68}=['Med_5'];
Ti_input_name{69}=['Med_6']; 
Ti_input_name{70}=['Med_7'];
Ti1_intup1(:,64:70)=LS1_Med(:,6,:);
Ti1_input_name{64}=['Med_1'];
Ti1_input_name{65}=['Med_2'];
Ti1_input_name{66}=['Med_3'];
Ti1_input_name{67}=['Med_4'];
Ti1_input_name{68}=['Med_5'];
Ti1_input_name{69}=['Med_6'];
Ti1_input_name{70}=['Med_7'];
Ti_intup1(:,71:77)=LS_NPa(:,6,:);
Ti_input_name{71}=['NPa_1'];
Ti_input_name{72}=['NPa_2'];
Ti_input_name{73}=['NPa_3']; 
Ti_input_name{74}=['NPa_4'];
Ti_input_name{75}=['NPa_5'];
Ti_input_name{76}=['NPa_6']; 
Ti_input_name{77}=['NPa_7'];
Ti1_intup1(:,71:77)=LS1_NPa(:,6,:);
Ti1_input_name{71}=['NPa_1'];
Ti1_input_name{72}=['NPa_2'];
Ti1_input_name{73}=['NPa_3'];
Ti1_input_name{74}=['NPa_4'];
Ti1_input_name{75}=['NPa_5'];
Ti1_input_name{76}=['NPa_6'];
Ti1_input_name{77}=['NPa_7'];
Ti_intup1(:,78:84)=LS_NGB(:,6,:);
Ti_input_name{78}=['NGB_1'];
Ti_input_name{79}=['NGB_2'];
Ti_input_name{80}=['NGB_3']; 
Ti_input_name{81}=['NGB_4'];
Ti_input_name{82}=['NGB_5'];
Ti_input_name{83}=['NGB_6']; 
Ti_input_name{84}=['NGB_7'];
Ti1_intup1(:,78:84)=LS1_NGB(:,6,:);
Ti1_input_name{78}=['NGB_1'];
Ti1_input_name{79}=['NGB_2'];
Ti1_input_name{80}=['NGB_3'];
Ti1_input_name{81}=['NGB_4'];
Ti1_input_name{82}=['NGB_5'];
Ti1_input_name{83}=['NGB_6'];
Ti1_input_name{84}=['NGB_7'];
Ti_intup1(:,85:91)=LS_NNAt(:,6,:);
Ti_input_name{85}=['NNAt_1'];
Ti_input_name{86}=['NNAt_2'];
Ti_input_name{87}=['NNAt_3']; 
Ti_input_name{88}=['NNAt_4'];
Ti_input_name{89}=['NNAt_5'];
Ti_input_name{90}=['NNAt_6']; 
Ti_input_name{91}=['NNAt_7']; 
Ti1_intup1(:,85:91)=LS1_NNAt(:,6,:);
Ti1_input_name{85}=['NNAt_1'];
Ti1_input_name{86}=['NNAt_2'];
Ti1_input_name{87}=['NNAt_3'];
Ti1_input_name{88}=['NNAt_4'];
Ti1_input_name{89}=['NNAt_5'];
Ti1_input_name{90}=['NNAt_6'];
Ti1_input_name{91}=['NNAt_7'];
Ti_intup1(:,92:98)=LS_Pi_out(:,1,:);
Ti_input_name{92}=['CPC_11'];
Ti_input_name{93}=['CPC_12'];
Ti_input_name{94}=['CPC_13']; 
Ti_input_name{95}=['CPC_14'];
Ti_input_name{96}=['CPC_15'];
Ti_input_name{97}=['CPC_16']; 
Ti_input_name{98}=['CPC_17'];
Ti1_intup1(:,92:98)=LS1_Pi_out(:,1,:);
Ti1_input_name{92}=['CPC_11'];
Ti1_input_name{93}=['CPC_12'];
Ti1_input_name{94}=['CPC_13']; 
Ti1_input_name{95}=['CPC_14'];
Ti1_input_name{96}=['CPC_15'];
Ti1_input_name{97}=['CPC_16']; 
Ti1_input_name{98}=['CPC_17'];
Ti_intup1(:,99:105)=LS_Pi_out(:,2,:);
Ti_input_name{99}=['CPC_21']; 
Ti_input_name{100}=['CPC_22']; 
Ti_input_name{101}=['CPC_23']; 
Ti_input_name{102}=['CPC_24']; 
Ti_input_name{103}=['CPC_25']; 
Ti_input_name{104}=['CPC_26']; 
Ti_input_name{105}=['CPC_27']; 
Ti1_intup1(:,99:105)=LS1_Pi_out(:,2,:);
Ti1_input_name{99}=['CPC_21'];
Ti1_input_name{100}=['CPC_22'];
Ti1_input_name{101}=['CPC_23']; 
Ti1_input_name{102}=['CPC_24'];
Ti1_input_name{103}=['CPC_25'];
Ti1_input_name{104}=['CPC_26']; 
Ti1_input_name{105}=['CPC_27'];
Ti_intup1(:,106:112)=LS_Pi_out(:,3,:);
Ti_input_name{106}=['CPC_31']; 
Ti_input_name{107}=['CPC_32']; 
Ti_input_name{108}=['CPC_33']; 
Ti_input_name{109}=['CPC_34']; 
Ti_input_name{110}=['CPC_35']; 
Ti_input_name{111}=['CPC_36']; 
Ti_input_name{112}=['CPC_37']; 
Ti1_intup1(:,106:112)=LS1_Pi_out(:,3,:);
Ti1_input_name{106}=['CPC_31'];
Ti1_input_name{107}=['CPC_32'];
Ti1_input_name{108}=['CPC_33']; 
Ti1_input_name{109}=['CPC_34'];
Ti1_input_name{110}=['CPC_35'];
Ti1_input_name{111}=['CPC_36']; 
Ti1_input_name{112}=['CPC_37'];
Ti_intup1(:,113:119)=LS_Pi_out(:,4,:);
Ti_input_name{113}=['CPC_41'];
Ti_input_name{114}=['CPC_42'];
Ti_input_name{115}=['CPC_43']; 
Ti_input_name{116}=['CPC_44'];
Ti_input_name{117}=['CPC_45'];
Ti_input_name{118}=['CPC_46']; 
Ti_input_name{119}=['CPC_47'];
Ti1_intup1(:,113:119)=LS1_Pi_out(:,4,:);
Ti1_input_name{113}=['CPC_41'];
Ti1_input_name{114}=['CPC_42'];
Ti1_input_name{115}=['CPC_43']; 
Ti1_input_name{116}=['CPC_44'];
Ti1_input_name{117}=['CPC_45'];
Ti1_input_name{118}=['CPC_46']; 
Ti1_input_name{119}=['CPC_47'];
Ti_intup1(:,120:126)=LS_Pi_out(:,5,:);
Ti_input_name{120}=['CPC_51']; 
Ti_input_name{121}=['CPC_52']; 
Ti_input_name{122}=['CPC_53']; 
Ti_input_name{123}=['CPC_54']; 
Ti_input_name{124}=['CPC_55']; 
Ti_input_name{125}=['CPC_56']; 
Ti_input_name{126}=['CPC_57']; 
Ti1_intup1(:,120:126)=LS1_Pi_out(:,5,:);
Ti1_input_name{120}=['CPC_51'];
Ti1_input_name{121}=['CPC_52'];
Ti1_input_name{122}=['CPC_53']; 
Ti1_input_name{123}=['CPC_54'];
Ti1_input_name{124}=['CPC_55'];
Ti1_input_name{125}=['CPC_56']; 
Ti1_input_name{126}=['CPC_57'];
Ti_intup1(:,127:133)=LS_Pi_out(:,6,:);
Ti_input_name{127}=['CPC_61']; 
Ti_input_name{128}=['CPC_62']; 
Ti_input_name{129}=['CPC_63']; 
Ti_input_name{130}=['CPC_64']; 
Ti_input_name{131}=['CPC_65']; 
Ti_input_name{132}=['CPC_66']; 
Ti_input_name{133}=['CPC_67']; 
Ti1_intup1(:,127:133)=LS1_Pi_out(:,6,:);
Ti1_input_name{127}=['CPC_61'];
Ti1_input_name{128}=['CPC_62'];
Ti1_input_name{129}=['CPC_63']; 
Ti1_input_name{130}=['CPC_64'];
Ti1_input_name{131}=['CPC_65'];
Ti1_input_name{132}=['CPC_66']; 
Ti1_input_name{133}=['CPC_67'];
Ti_intup1(:,134:140)=LS_Pi_out(:,7,:);
Ti_input_name{134}=['CPC_71'];
Ti_input_name{135}=['CPC_72'];
Ti_input_name{136}=['CPC_73']; 
Ti_input_name{137}=['CPC_74'];
Ti_input_name{138}=['CPC_75'];
Ti_input_name{139}=['CPC_76']; 
Ti_input_name{140}=['CPC_77'];
Ti1_intup1(:,134:140)=LS1_Pi_out(:,7,:);
Ti1_input_name{134}=['CPC_71'];
Ti1_input_name{135}=['CPC_72'];
Ti1_input_name{136}=['CPC_73']; 
Ti1_input_name{137}=['CPC_74'];
Ti1_input_name{138}=['CPC_75'];
Ti1_input_name{139}=['CPC_76']; 
Ti1_input_name{140}=['CPC_77'];
%%%%********************************************************
Tr_intup1(:,1:7)=LS_TEM(:,7,:);
Tr_input_name{1}=['TEM_1'];
Tr_input_name{2}=['TEM_2'];
Tr_input_name{3}=['TEM_3']; 
Tr_input_name{4}=['TEM_4'];
Tr_input_name{5}=['TEM_5'];
Tr_input_name{6}=['TEM_6']; 
Tr_input_name{7}=['TEM_7'];
Tr1_intup1(:,1:7)=LS1_TEM(:,7,:);
Tr1_input_name{1}=['TEM_1'];
Tr1_input_name{2}=['TEM_2'];
Tr1_input_name{3}=['TEM_3'];  
Tr1_input_name{4}=['TEM_4']; 
Tr1_input_name{5}=['TEM_5']; 
Tr1_input_name{6}=['TEM_6']; 
Tr1_input_name{7}=['TEM_7']; 
Tr_intup1(:,8:14)=LS_SAt(:,7,:);
Tr_input_name{8}=['SAt_1'];
Tr_input_name{9}=['SAt_2'];
Tr_input_name{10}=['SAt_3']; 
Tr_input_name{11}=['SAt_4'];
Tr_input_name{12}=['SAt_5'];
Tr_input_name{13}=['SAt_6']; 
Tr_input_name{14}=['SAt_7'];
Tr1_intup1(:,8:14)=LS1_SAt(:,7,:);
Tr1_input_name{8}=['SAt_1'];
Tr1_input_name{9}=['SAt_2'];
Tr1_input_name{10}=['SAt_3'];
Tr1_input_name{11}=['SAt_4'];
Tr1_input_name{12}=['SAt_5'];
Tr1_input_name{13}=['SAt_6'];
Tr1_input_name{14}=['SAt_7'];
Tr_intup1(:,15:21)=LS_NAt(:,7,:);
Tr_input_name{15}=['NAt_1'];
Tr_input_name{16}=['NAt_2'];
Tr_input_name{17}=['NAt_3']; 
Tr_input_name{18}=['NAt_4'];
Tr_input_name{19}=['NAt_5'];
Tr_input_name{20}=['NAt_6'];
Tr_input_name{21}=['NAt_7'];
Tr1_intup1(:,15:21)=LS1_NAt(:,7,:);
Tr1_input_name{15}=['NAt_1'];
Tr1_input_name{16}=['NAt_2'];
Tr1_input_name{17}=['NAt_3']; 
Tr1_input_name{18}=['NAt_4'];
Tr1_input_name{19}=['NAt_5'];
Tr1_input_name{20}=['NAt_6']; 
Tr1_input_name{21}=['NAt_7'];  
Tr_intup1(:,22:28)=LS_SPa(:,7,:);
Tr_input_name{22}=['SPa_1'];
Tr_input_name{23}=['SPa_2'];
Tr_input_name{24}=['SPa_3']; 
Tr_input_name{25}=['SPa_4'];
Tr_input_name{26}=['SPa_5'];
Tr_input_name{27}=['SPa_6'];
Tr_input_name{28}=['SPa_7'];
Tr1_intup1(:,22:28)=LS1_SPa(:,7,:);
Tr1_input_name{22}=['SPa_1'];
Tr1_input_name{23}=['SPa_2'];
Tr1_input_name{24}=['SPa_3'];
Tr1_input_name{25}=['SPa_4'];
Tr1_input_name{26}=['SPa_5'];
Tr1_input_name{27}=['SPa_6'];
Tr1_input_name{28}=['SPa_7'];
Tr_intup1(:,29:35)=LS_Baltic(:,7,:);
Tr_input_name{29}=['Baltic_1'];
Tr_input_name{30}=['Baltic_2'];
Tr_input_name{31}=['Baltic_3']; 
Tr_input_name{32}=['Baltic_4'];
Tr_input_name{33}=['Baltic_5'];
Tr_input_name{34}=['Baltic_6']; 
Tr_input_name{35}=['Baltic_7'];
Tr1_intup1(:,29:35)=LS1_Baltic(:,7,:);
Tr1_input_name{29}=['Baltic_1'];
Tr1_input_name{30}=['Baltic_2'];
Tr1_input_name{31}=['Baltic_3'];
Tr1_input_name{32}=['Baltic_4'];
Tr1_input_name{33}=['Baltic_5'];
Tr1_input_name{34}=['Baltic_6'];
Tr1_input_name{35}=['Baltic_7'];
Tr_intup1(:,36:42)=LS_CPC_M(:,7,:);
Tr_input_name{36}=['CPC_M_1'];
Tr_input_name{37}=['CPC_M_2'];
Tr_input_name{38}=['CPC_M_3']; 
Tr_input_name{39}=['CPC_M_4'];
Tr_input_name{40}=['CPC_M_5'];
Tr_input_name{41}=['CPC_M_6']; 
Tr_input_name{42}=['CPC_M_7'];
Tr1_intup1(:,36:42)=LS1_CPC_M(:,7,:);
Tr1_input_name{36}=['CPC_M_1'];
Tr1_input_name{37}=['CPC_M_2'];
Tr1_input_name{38}=['CPC_M_3'];
Tr1_input_name{39}=['CPC_M_4'];
Tr1_input_name{40}=['CPC_M_5'];
Tr1_input_name{41}=['CPC_M_6'];
Tr1_input_name{42}=['CPC_M_7'];
Tr_intup1(:,43:49)=LS_Black(:,7,:);
Tr_input_name{43}=['Black_1'];
Tr_input_name{44}=['Black_2'];
Tr_input_name{45}=['Black_3']; 
Tr_input_name{46}=['Black_4'];
Tr_input_name{47}=['Black_5'];
Tr_input_name{48}=['Black_6']; 
Tr_input_name{49}=['Black_7']; 
Tr1_intup1(:,43:49)=LS1_Black(:,7,:);
Tr1_input_name{43}=['Black_1'];
Tr1_input_name{44}=['Black_2'];
Tr1_input_name{45}=['Black_3'];
Tr1_input_name{46}=['Black_4'];
Tr1_input_name{47}=['Black_5'];
Tr1_input_name{48}=['Black_6'];
Tr1_input_name{49}=['Black_7'];
Tr_intup1(:,50:56)=LS_Hudson(:,7,:);
Tr_input_name{50}=['Hudson_1'];
Tr_input_name{51}=['Hudson_2'];
Tr_input_name{52}=['Hudson_3']; 
Tr_input_name{53}=['Hudson_4'];
Tr_input_name{54}=['Hudson_5'];
Tr_input_name{55}=['Hudson_6']; 
Tr_input_name{56}=['Hudson_7'];
Tr1_intup1(:,50:56)=LS1_Hudson(:,7,:);
Tr1_input_name{50}=['Hudson_1'];
Tr1_input_name{51}=['Hudson_2'];
Tr1_input_name{52}=['Hudson_3'];
Tr1_input_name{53}=['Hudson_4'];
Tr1_input_name{54}=['Hudson_5'];
Tr1_input_name{55}=['Hudson_6'];
Tr1_input_name{56}=['Hudson_7'];
Tr_intup1(:,57:63)=LS_Ind(:,7,:);
Tr_input_name{57}=['Ind_1'];
Tr_input_name{58}=['Ind_2'];
Tr_input_name{59}=['Ind_3']; 
Tr_input_name{60}=['Ind_4'];
Tr_input_name{61}=['Ind_5'];
Tr_input_name{62}=['Ind_6']; 
Tr_input_name{63}=['Ind_7'];
Tr1_intup1(:,57:63)=LS1_Ind(:,7,:);
Tr1_input_name{57}=['Ind_1'];
Tr1_input_name{58}=['Ind_2'];
Tr1_input_name{59}=['Ind_3'];
Tr1_input_name{60}=['Ind_4'];
Tr1_input_name{61}=['Ind_5'];
Tr1_input_name{62}=['Ind_6'];
Tr1_input_name{63}=['Ind_7'];
Tr_intup1(:,64:70)=LS_Med(:,7,:);
Tr_input_name{64}=['Med_1'];
Tr_input_name{65}=['Med_2'];
Tr_input_name{66}=['Med_3']; 
Tr_input_name{67}=['Med_4'];
Tr_input_name{68}=['Med_5'];
Tr_input_name{69}=['Med_6']; 
Tr_input_name{70}=['Med_7'];
Tr1_intup1(:,64:70)=LS1_Med(:,7,:);
Tr1_input_name{64}=['Med_1'];
Tr1_input_name{65}=['Med_2'];
Tr1_input_name{66}=['Med_3'];
Tr1_input_name{67}=['Med_4'];
Tr1_input_name{68}=['Med_5'];
Tr1_input_name{69}=['Med_6'];
Tr1_input_name{70}=['Med_7'];
Tr_intup1(:,71:77)=LS_NPa(:,7,:);
Tr_input_name{71}=['NPa_1'];
Tr_input_name{72}=['NPa_2'];
Tr_input_name{73}=['NPa_3']; 
Tr_input_name{74}=['NPa_4'];
Tr_input_name{75}=['NPa_5'];
Tr_input_name{76}=['NPa_6']; 
Tr_input_name{77}=['NPa_7'];
Tr1_intup1(:,71:77)=LS1_NPa(:,7,:);
Tr1_input_name{71}=['NPa_1'];
Tr1_input_name{72}=['NPa_2'];
Tr1_input_name{73}=['NPa_3'];
Tr1_input_name{74}=['NPa_4'];
Tr1_input_name{75}=['NPa_5'];
Tr1_input_name{76}=['NPa_6'];
Tr1_input_name{77}=['NPa_7'];
Tr_intup1(:,78:84)=LS_NGB(:,7,:);
Tr_input_name{78}=['NGB_1'];
Tr_input_name{79}=['NGB_2'];
Tr_input_name{80}=['NGB_3']; 
Tr_input_name{81}=['NGB_4'];
Tr_input_name{82}=['NGB_5'];
Tr_input_name{83}=['NGB_6']; 
Tr_input_name{84}=['NGB_7'];
Tr1_intup1(:,78:84)=LS1_NGB(:,7,:);
Tr1_input_name{78}=['NGB_1'];
Tr1_input_name{79}=['NGB_2'];
Tr1_input_name{80}=['NGB_3'];
Tr1_input_name{81}=['NGB_4'];
Tr1_input_name{82}=['NGB_5'];
Tr1_input_name{83}=['NGB_6'];
Tr1_input_name{84}=['NGB_7'];
Tr_intup1(:,85:91)=LS_NNAt(:,7,:);
Tr_input_name{85}=['NNAt_1'];
Tr_input_name{86}=['NNAt_2'];
Tr_input_name{87}=['NNAt_3']; 
Tr_input_name{88}=['NNAt_4'];
Tr_input_name{89}=['NNAt_5'];
Tr_input_name{90}=['NNAt_6']; 
Tr_input_name{91}=['NNAt_7']; 
Tr1_intup1(:,85:91)=LS1_NNAt(:,7,:);
Tr1_input_name{85}=['NNAt_1'];
Tr1_input_name{86}=['NNAt_2'];
Tr1_input_name{87}=['NNAt_3'];
Tr1_input_name{88}=['NNAt_4'];
Tr1_input_name{89}=['NNAt_5'];
Tr1_input_name{90}=['NNAt_6'];
Tr1_input_name{91}=['NNAt_7'];
Tr_intup1(:,92:98)=LS_P_out(:,1,:);
Tr_input_name{92}=['CPC_11'];
Tr_input_name{93}=['CPC_12'];
Tr_input_name{94}=['CPC_13']; 
Tr_input_name{95}=['CPC_14'];
Tr_input_name{96}=['CPC_15'];
Tr_input_name{97}=['CPC_16']; 
Tr_input_name{98}=['CPC_17'];
Tr1_intup1(:,92:98)=LS1_P_out(:,1,:);
Tr1_input_name{92}=['CPC_11'];
Tr1_input_name{93}=['CPC_12'];
Tr1_input_name{94}=['CPC_13']; 
Tr1_input_name{95}=['CPC_14'];
Tr1_input_name{96}=['CPC_15'];
Tr1_input_name{97}=['CPC_16']; 
Tr1_input_name{98}=['CPC_17'];
Tr_intup1(:,99:105)=LS_P_out(:,2,:);
Tr_input_name{99}=['CPC_21']; 
Tr_input_name{100}=['CPC_22']; 
Tr_input_name{101}=['CPC_23']; 
Tr_input_name{102}=['CPC_24']; 
Tr_input_name{103}=['CPC_25']; 
Tr_input_name{104}=['CPC_26']; 
Tr_input_name{105}=['CPC_27']; 
Tr1_intup1(:,99:105)=LS1_P_out(:,2,:);
Tr1_input_name{99}=['CPC_21'];
Tr1_input_name{100}=['CPC_22'];
Tr1_input_name{101}=['CPC_23']; 
Tr1_input_name{102}=['CPC_24'];
Tr1_input_name{103}=['CPC_25'];
Tr1_input_name{104}=['CPC_26']; 
Tr1_input_name{105}=['CPC_27'];
Tr_intup1(:,106:112)=LS_P_out(:,3,:);
Tr_input_name{106}=['CPC_31']; 
Tr_input_name{107}=['CPC_32']; 
Tr_input_name{108}=['CPC_33']; 
Tr_input_name{109}=['CPC_34']; 
Tr_input_name{110}=['CPC_35']; 
Tr_input_name{111}=['CPC_36']; 
Tr_input_name{112}=['CPC_37']; 
Tr1_intup1(:,106:112)=LS1_P_out(:,3,:);
Tr1_input_name{106}=['CPC_31'];
Tr1_input_name{107}=['CPC_32'];
Tr1_input_name{108}=['CPC_33']; 
Tr1_input_name{109}=['CPC_34'];
Tr1_input_name{110}=['CPC_35'];
Tr1_input_name{111}=['CPC_36']; 
Tr1_input_name{112}=['CPC_37'];
Tr_intup1(:,113:119)=LS_P_out(:,4,:);
Tr_input_name{113}=['CPC_41'];
Tr_input_name{114}=['CPC_42'];
Tr_input_name{115}=['CPC_43']; 
Tr_input_name{116}=['CPC_44'];
Tr_input_name{117}=['CPC_45'];
Tr_input_name{118}=['CPC_46']; 
Tr_input_name{119}=['CPC_47'];
Tr1_intup1(:,113:119)=LS1_P_out(:,4,:);
Tr1_input_name{113}=['CPC_41'];
Tr1_input_name{114}=['CPC_42'];
Tr1_input_name{115}=['CPC_43']; 
Tr1_input_name{116}=['CPC_44'];
Tr1_input_name{117}=['CPC_45'];
Tr1_input_name{118}=['CPC_46']; 
Tr1_input_name{119}=['CPC_47'];
Tr_intup1(:,120:126)=LS_P_out(:,5,:);
Tr_input_name{120}=['CPC_51']; 
Tr_input_name{121}=['CPC_52']; 
Tr_input_name{122}=['CPC_53']; 
Tr_input_name{123}=['CPC_54']; 
Tr_input_name{124}=['CPC_55']; 
Tr_input_name{125}=['CPC_56']; 
Tr_input_name{126}=['CPC_57']; 
Tr1_intup1(:,120:126)=LS1_P_out(:,5,:);
Tr1_input_name{120}=['CPC_51'];
Tr1_input_name{121}=['CPC_52'];
Tr1_input_name{122}=['CPC_53']; 
Tr1_input_name{123}=['CPC_54'];
Tr1_input_name{124}=['CPC_55'];
Tr1_input_name{125}=['CPC_56']; 
Tr1_input_name{126}=['CPC_57'];
Tr_intup1(:,127:133)=LS_P_out(:,6,:);
Tr_input_name{127}=['CPC_61']; 
Tr_input_name{128}=['CPC_62']; 
Tr_input_name{129}=['CPC_63']; 
Tr_input_name{130}=['CPC_64']; 
Tr_input_name{131}=['CPC_65']; 
Tr_input_name{132}=['CPC_66']; 
Tr_input_name{133}=['CPC_67']; 
Tr1_intup1(:,127:133)=LS1_P_out(:,6,:);
Tr1_input_name{127}=['CPC_61'];
Tr1_input_name{128}=['CPC_62'];
Tr1_input_name{129}=['CPC_63']; 
Tr1_input_name{130}=['CPC_64'];
Tr1_input_name{131}=['CPC_65'];
Tr1_input_name{132}=['CPC_66']; 
Tr1_input_name{133}=['CPC_67'];
Tr_intup1(:,134:140)=LS_P_out(:,7,:);
Tr_input_name{134}=['CPC_71'];
Tr_input_name{135}=['CPC_72'];
Tr_input_name{136}=['CPC_73']; 
Tr_input_name{137}=['CPC_74'];
Tr_input_name{138}=['CPC_75'];
Tr_input_name{139}=['CPC_76']; 
Tr_input_name{140}=['CPC_77'];
Tr1_intup1(:,134:140)=LS1_P_out(:,7,:);
Tr1_input_name{134}=['CPC_71'];
Tr1_input_name{135}=['CPC_72'];
Tr1_input_name{136}=['CPC_73']; 
Tr1_input_name{137}=['CPC_74'];
Tr1_input_name{138}=['CPC_75'];
Tr1_input_name{139}=['CPC_76']; 
Tr1_input_name{140}=['CPC_77'];
% % %**************************************************************************
Ts_intup1(:,1:7)=LS_TEM(:,3,:);
Ts_input_name{1}=['TEM_1'];
Ts_input_name{2}=['TEM_2'];
Ts_input_name{3}=['TEM_3']; 
Ts_input_name{4}=['TEM_4'];
Ts_input_name{5}=['TEM_5'];
Ts_input_name{6}=['TEM_6']; 
Ts_input_name{7}=['TEM_7'];
Ts1_intup1(:,1:7)=LS1_TEM(:,3,:);
Ts1_input_name{1}=['TEM_1'];
Ts1_input_name{2}=['TEM_2'];
Ts1_input_name{3}=['TEM_3'];  
Ts1_input_name{4}=['TEM_4']; 
Ts1_input_name{5}=['TEM_5']; 
Ts1_input_name{6}=['TEM_6']; 
Ts1_input_name{7}=['TEM_7']; 
Ts_intup1(:,8:14)=LS_SAt(:,3,:);
Ts_input_name{8}=['SAt_1'];
Ts_input_name{9}=['SAt_2'];
Ts_input_name{10}=['SAt_3']; 
Ts_input_name{11}=['SAt_4'];
Ts_input_name{12}=['SAt_5'];
Ts_input_name{13}=['SAt_6']; 
Ts_input_name{14}=['SAt_7'];
Ts1_intup1(:,8:14)=LS1_SAt(:,3,:);
Ts1_input_name{8}=['SAt_1'];
Ts1_input_name{9}=['SAt_2'];
Ts1_input_name{10}=['SAt_3'];
Ts1_input_name{11}=['SAt_4'];
Ts1_input_name{12}=['SAt_5'];
Ts1_input_name{13}=['SAt_6'];
Ts1_input_name{14}=['SAt_7'];
Ts_intup1(:,15:21)=LS_NAt(:,3,:);
Ts_input_name{15}=['NAt_1'];
Ts_input_name{16}=['NAt_2'];
Ts_input_name{17}=['NAt_3']; 
Ts_input_name{18}=['NAt_4'];
Ts_input_name{19}=['NAt_5'];
Ts_input_name{20}=['NAt_6'];
Ts_input_name{21}=['NAt_7'];
Ts1_intup1(:,15:21)=LS1_NAt(:,3,:);
Ts1_input_name{15}=['NAt_1'];
Ts1_input_name{16}=['NAt_2'];
Ts1_input_name{17}=['NAt_3']; 
Ts1_input_name{18}=['NAt_4'];
Ts1_input_name{19}=['NAt_5'];
Ts1_input_name{20}=['NAt_6']; 
Ts1_input_name{21}=['NAt_7'];  
Ts_intup1(:,22:28)=LS_SPa(:,3,:);
Ts_input_name{22}=['SPa_1'];
Ts_input_name{23}=['SPa_2'];
Ts_input_name{24}=['SPa_3']; 
Ts_input_name{25}=['SPa_4'];
Ts_input_name{26}=['SPa_5'];
Ts_input_name{27}=['SPa_6'];
Ts_input_name{28}=['SPa_7'];
Ts1_intup1(:,22:28)=LS1_SPa(:,3,:);
Ts1_input_name{22}=['SPa_1'];
Ts1_input_name{23}=['SPa_2'];
Ts1_input_name{24}=['SPa_3'];
Ts1_input_name{25}=['SPa_4'];
Ts1_input_name{26}=['SPa_5'];
Ts1_input_name{27}=['SPa_6'];
Ts1_input_name{28}=['SPa_7'];
Ts_intup1(:,29:35)=LS_Baltic(:,3,:);
Ts_input_name{29}=['Baltic_1'];
Ts_input_name{30}=['Baltic_2'];
Ts_input_name{31}=['Baltic_3']; 
Ts_input_name{32}=['Baltic_4'];
Ts_input_name{33}=['Baltic_5'];
Ts_input_name{34}=['Baltic_6']; 
Ts_input_name{35}=['Baltic_7'];
Ts1_intup1(:,29:35)=LS1_Baltic(:,3,:);
Ts1_input_name{29}=['Baltic_1'];
Ts1_input_name{30}=['Baltic_2'];
Ts1_input_name{31}=['Baltic_3'];
Ts1_input_name{32}=['Baltic_4'];
Ts1_input_name{33}=['Baltic_5'];
Ts1_input_name{34}=['Baltic_6'];
Ts1_input_name{35}=['Baltic_7'];
Ts_intup1(:,36:42)=LS_CPC_M(:,3,:);
Ts_input_name{36}=['CPC_M_1'];
Ts_input_name{37}=['CPC_M_2'];
Ts_input_name{38}=['CPC_M_3']; 
Ts_input_name{39}=['CPC_M_4'];
Ts_input_name{40}=['CPC_M_5'];
Ts_input_name{41}=['CPC_M_6']; 
Ts_input_name{42}=['CPC_M_7'];
Ts1_intup1(:,36:42)=LS1_CPC_M(:,3,:);
Ts1_input_name{36}=['CPC_M_1'];
Ts1_input_name{37}=['CPC_M_2'];
Ts1_input_name{38}=['CPC_M_3'];
Ts1_input_name{39}=['CPC_M_4'];
Ts1_input_name{40}=['CPC_M_5'];
Ts1_input_name{41}=['CPC_M_6'];
Ts1_input_name{42}=['CPC_M_7'];
Ts_intup1(:,43:49)=LS_Black(:,3,:);
Ts_input_name{43}=['Black_1'];
Ts_input_name{44}=['Black_2'];
Ts_input_name{45}=['Black_3']; 
Ts_input_name{46}=['Black_4'];
Ts_input_name{47}=['Black_5'];
Ts_input_name{48}=['Black_6']; 
Ts_input_name{49}=['Black_7']; 
Ts1_intup1(:,43:49)=LS1_Black(:,3,:);
Ts1_input_name{43}=['Black_1'];
Ts1_input_name{44}=['Black_2'];
Ts1_input_name{45}=['Black_3'];
Ts1_input_name{46}=['Black_4'];
Ts1_input_name{47}=['Black_5'];
Ts1_input_name{48}=['Black_6'];
Ts1_input_name{49}=['Black_7'];
Ts_intup1(:,50:56)=LS_Hudson(:,3,:);
Ts_input_name{50}=['Hudson_1'];
Ts_input_name{51}=['Hudson_2'];
Ts_input_name{52}=['Hudson_3']; 
Ts_input_name{53}=['Hudson_4'];
Ts_input_name{54}=['Hudson_5'];
Ts_input_name{55}=['Hudson_6']; 
Ts_input_name{56}=['Hudson_7'];
Ts1_intup1(:,50:56)=LS1_Hudson(:,3,:);
Ts1_input_name{50}=['Hudson_1'];
Ts1_input_name{51}=['Hudson_2'];
Ts1_input_name{52}=['Hudson_3'];
Ts1_input_name{53}=['Hudson_4'];
Ts1_input_name{54}=['Hudson_5'];
Ts1_input_name{55}=['Hudson_6'];
Ts1_input_name{56}=['Hudson_7'];
Ts_intup1(:,57:63)=LS_Ind(:,3,:);
Ts_input_name{57}=['Ind_1'];
Ts_input_name{58}=['Ind_2'];
Ts_input_name{59}=['Ind_3']; 
Ts_input_name{60}=['Ind_4'];
Ts_input_name{61}=['Ind_5'];
Ts_input_name{62}=['Ind_6']; 
Ts_input_name{63}=['Ind_7'];
Ts1_intup1(:,57:63)=LS1_Ind(:,3,:);
Ts1_input_name{57}=['Ind_1'];
Ts1_input_name{58}=['Ind_2'];
Ts1_input_name{59}=['Ind_3'];
Ts1_input_name{60}=['Ind_4'];
Ts1_input_name{61}=['Ind_5'];
Ts1_input_name{62}=['Ind_6'];
Ts1_input_name{63}=['Ind_7'];
Ts_intup1(:,64:70)=LS_Med(:,3,:);
Ts_input_name{64}=['Med_1'];
Ts_input_name{65}=['Med_2'];
Ts_input_name{66}=['Med_3']; 
Ts_input_name{67}=['Med_4'];
Ts_input_name{68}=['Med_5'];
Ts_input_name{69}=['Med_6']; 
Ts_input_name{70}=['Med_7'];
Ts1_intup1(:,64:70)=LS1_Med(:,3,:);
Ts1_input_name{64}=['Med_1'];
Ts1_input_name{65}=['Med_2'];
Ts1_input_name{66}=['Med_3'];
Ts1_input_name{67}=['Med_4'];
Ts1_input_name{68}=['Med_5'];
Ts1_input_name{69}=['Med_6'];
Ts1_input_name{70}=['Med_7'];
Ts_intup1(:,71:77)=LS_NPa(:,3,:);
Ts_input_name{71}=['NPa_1'];
Ts_input_name{72}=['NPa_2'];
Ts_input_name{73}=['NPa_3']; 
Ts_input_name{74}=['NPa_4'];
Ts_input_name{75}=['NPa_5'];
Ts_input_name{76}=['NPa_6']; 
Ts_input_name{77}=['NPa_7'];
Ts1_intup1(:,71:77)=LS1_NPa(:,3,:);
Ts1_input_name{71}=['NPa_1'];
Ts1_input_name{72}=['NPa_2'];
Ts1_input_name{73}=['NPa_3'];
Ts1_input_name{74}=['NPa_4'];
Ts1_input_name{75}=['NPa_5'];
Ts1_input_name{76}=['NPa_6'];
Ts1_input_name{77}=['NPa_7'];
Ts_intup1(:,78:84)=LS_NGB(:,3,:);
Ts_input_name{78}=['NGB_1'];
Ts_input_name{79}=['NGB_2'];
Ts_input_name{80}=['NGB_3']; 
Ts_input_name{81}=['NGB_4'];
Ts_input_name{82}=['NGB_5'];
Ts_input_name{83}=['NGB_6']; 
Ts_input_name{84}=['NGB_7'];
Ts1_intup1(:,78:84)=LS1_NGB(:,3,:);
Ts1_input_name{78}=['NGB_1'];
Ts1_input_name{79}=['NGB_2'];
Ts1_input_name{80}=['NGB_3'];
Ts1_input_name{81}=['NGB_4'];
Ts1_input_name{82}=['NGB_5'];
Ts1_input_name{83}=['NGB_6'];
Ts1_input_name{84}=['NGB_7'];
Ts_intup1(:,85:91)=LS_NNAt(:,3,:);
Ts_input_name{85}=['NNAt_1'];
Ts_input_name{86}=['NNAt_2'];
Ts_input_name{87}=['NNAt_3']; 
Ts_input_name{88}=['NNAt_4'];
Ts_input_name{89}=['NNAt_5'];
Ts_input_name{90}=['NNAt_6']; 
Ts_input_name{91}=['NNAt_7']; 
Ts1_intup1(:,85:91)=LS1_NNAt(:,3,:);
Ts1_input_name{85}=['NNAt_1'];
Ts1_input_name{86}=['NNAt_2'];
Ts1_input_name{87}=['NNAt_3'];
Ts1_input_name{88}=['NNAt_4'];
Ts1_input_name{89}=['NNAt_5'];
Ts1_input_name{90}=['NNAt_6'];
Ts1_input_name{91}=['NNAt_7'];
ir=140;
ss=91;
elseif mode==8
Ti_intup1(:,1:8)=LS_TEM(:,6,:);
Ti_input_name{1}=['TEM_1'];
Ti_input_name{2}=['TEM_2'];
Ti_input_name{3}=['TEM_3']; 
Ti_input_name{4}=['TEM_4'];
Ti_input_name{5}=['TEM_5'];
Ti_input_name{6}=['TEM_6']; 
Ti_input_name{7}=['TEM_7'];
Ti_input_name{8}=['TEM_8'];
Ti1_intup1(:,1:8)=LS1_TEM(:,6,:);
Ti1_input_name{1}=['TEM_1'];
Ti1_input_name{2}=['TEM_2'];
Ti1_input_name{3}=['TEM_3'];  
Ti1_input_name{4}=['TEM_4']; 
Ti1_input_name{5}=['TEM_5']; 
Ti1_input_name{6}=['TEM_6']; 
Ti1_input_name{7}=['TEM_7']; 
Ti1_input_name{8}=['TEM_8']; 
Ti_intup1(:,9:16)=LS_SAt(:,6,:);
Ti_input_name{9}=['SAt_1'];
Ti_input_name{10}=['SAt_2'];
Ti_input_name{11}=['SAt_3']; 
Ti_input_name{12}=['SAt_4'];
Ti_input_name{13}=['SAt_5'];
Ti_input_name{14}=['SAt_6']; 
Ti_input_name{15}=['SAt_7'];
Ti_input_name{16}=['SAt_8'];
Ti1_intup1(:,9:16)=LS1_SAt(:,6,:);
Ti1_input_name{9}=['SAt_1'];
Ti1_input_name{10}=['SAt_2'];
Ti1_input_name{11}=['SAt_3'];
Ti1_input_name{12}=['SAt_4'];
Ti1_input_name{13}=['SAt_5'];
Ti1_input_name{14}=['SAt_6'];
Ti1_input_name{15}=['SAt_7'];
Ti1_input_name{16}=['SAt_8'];
Ti_intup1(:,17:24)=LS_NAt(:,6,:);
Ti_input_name{17}=['NAt_1'];
Ti_input_name{18}=['NAt_2'];
Ti_input_name{19}=['NAt_3']; 
Ti_input_name{20}=['NAt_4'];
Ti_input_name{21}=['NAt_5'];
Ti_input_name{22}=['NAt_6'];
Ti_input_name{23}=['NAt_7'];
Ti_input_name{24}=['NAt_8'];
Ti1_intup1(:,17:24)=LS1_NAt(:,6,:);
Ti1_input_name{17}=['NAt_1'];
Ti1_input_name{18}=['NAt_2'];
Ti1_input_name{19}=['NAt_3']; 
Ti1_input_name{20}=['NAt_4'];
Ti1_input_name{21}=['NAt_5'];
Ti1_input_name{22}=['NAt_6']; 
Ti1_input_name{23}=['NAt_7'];
Ti1_input_name{24}=['NAt_8']; 
Ti_intup1(:,25:32)=LS_SPa(:,6,:);
Ti_input_name{25}=['SPa_1'];
Ti_input_name{26}=['SPa_2'];
Ti_input_name{27}=['SPa_3']; 
Ti_input_name{28}=['SPa_4'];
Ti_input_name{29}=['SPa_5'];
Ti_input_name{30}=['SPa_6'];
Ti_input_name{31}=['SPa_7'];
Ti_input_name{32}=['SPa_8'];
Ti1_intup1(:,25:32)=LS1_SPa(:,6,:);
Ti1_input_name{25}=['SPa_1'];
Ti1_input_name{26}=['SPa_2'];
Ti1_input_name{27}=['SPa_3'];
Ti1_input_name{28}=['SPa_4'];
Ti1_input_name{29}=['SPa_5'];
Ti1_input_name{30}=['SPa_6'];
Ti1_input_name{31}=['SPa_7'];
Ti1_input_name{32}=['SPa_8'];
Ti_intup1(:,33:40)=LS_Baltic(:,6,:);
Ti_input_name{33}=['Baltic_1'];
Ti_input_name{34}=['Baltic_2'];
Ti_input_name{35}=['Baltic_3']; 
Ti_input_name{36}=['Baltic_4'];
Ti_input_name{37}=['Baltic_5'];
Ti_input_name{38}=['Baltic_6']; 
Ti_input_name{39}=['Baltic_7'];
Ti_input_name{40}=['Baltic_8'];
Ti1_intup1(:,33:40)=LS1_Baltic(:,6,:);
Ti1_input_name{33}=['Baltic_1'];
Ti1_input_name{34}=['Baltic_2'];
Ti1_input_name{35}=['Baltic_3'];
Ti1_input_name{36}=['Baltic_4'];
Ti1_input_name{37}=['Baltic_5'];
Ti1_input_name{38}=['Baltic_6'];
Ti1_input_name{39}=['Baltic_7'];
Ti1_input_name{40}=['Baltic_8'];
Ti_intup1(:,41:48)=LS_CPC_M(:,6,:);
Ti_input_name{41}=['CPC_M_1'];
Ti_input_name{42}=['CPC_M_2'];
Ti_input_name{43}=['CPC_M_3']; 
Ti_input_name{44}=['CPC_M_4'];
Ti_input_name{45}=['CPC_M_5'];
Ti_input_name{46}=['CPC_M_6']; 
Ti_input_name{47}=['CPC_M_7'];
Ti_input_name{48}=['CPC_M_8'];
Ti1_intup1(:,41:48)=LS1_CPC_M(:,6,:);
Ti1_input_name{41}=['CPC_M_1'];
Ti1_input_name{42}=['CPC_M_2'];
Ti1_input_name{43}=['CPC_M_3'];
Ti1_input_name{44}=['CPC_M_4'];
Ti1_input_name{45}=['CPC_M_5'];
Ti1_input_name{46}=['CPC_M_6'];
Ti1_input_name{47}=['CPC_M_7'];
Ti1_input_name{48}=['CPC_M_8'];
Ti_intup1(:,49:56)=LS_Black(:,6,:);
Ti_input_name{49}=['Black_1'];
Ti_input_name{50}=['Black_2'];
Ti_input_name{51}=['Black_3']; 
Ti_input_name{52}=['Black_4'];
Ti_input_name{53}=['Black_5'];
Ti_input_name{54}=['Black_6']; 
Ti_input_name{55}=['Black_7'];
Ti_input_name{56}=['Black_8'];
Ti1_intup1(:,49:56)=LS1_Black(:,6,:);
Ti1_input_name{49}=['Black_1'];
Ti1_input_name{50}=['Black_2'];
Ti1_input_name{51}=['Black_3'];
Ti1_input_name{52}=['Black_4'];
Ti1_input_name{53}=['Black_5'];
Ti1_input_name{54}=['Black_6'];
Ti1_input_name{55}=['Black_7'];
Ti1_input_name{56}=['Black_8'];
Ti_intup1(:,57:64)=LS_Hudson(:,6,:);
Ti_input_name{57}=['Hudson_1'];
Ti_input_name{58}=['Hudson_2'];
Ti_input_name{59}=['Hudson_3']; 
Ti_input_name{60}=['Hudson_4'];
Ti_input_name{61}=['Hudson_5'];
Ti_input_name{62}=['Hudson_6']; 
Ti_input_name{63}=['Hudson_7'];
Ti_input_name{64}=['Hudson_8']; 
Ti1_intup1(:,57:64)=LS1_Hudson(:,6,:);
Ti1_input_name{57}=['Hudson_1'];
Ti1_input_name{58}=['Hudson_2'];
Ti1_input_name{59}=['Hudson_3'];
Ti1_input_name{60}=['Hudson_4'];
Ti1_input_name{61}=['Hudson_5'];
Ti1_input_name{62}=['Hudson_6'];
Ti1_input_name{63}=['Hudson_7'];
Ti1_input_name{64}=['Hudson_8'];
Ti_intup1(:,65:72)=LS_Ind(:,6,:);
Ti_input_name{65}=['Ind_1'];
Ti_input_name{66}=['Ind_2'];
Ti_input_name{67}=['Ind_3']; 
Ti_input_name{68}=['Ind_4'];
Ti_input_name{69}=['Ind_5'];
Ti_input_name{70}=['Ind_6']; 
Ti_input_name{71}=['Ind_7'];
Ti_input_name{72}=['Ind_8'];
Ti1_intup1(:,65:72)=LS1_Ind(:,6,:);
Ti1_input_name{65}=['Ind_1'];
Ti1_input_name{66}=['Ind_2'];
Ti1_input_name{67}=['Ind_3'];
Ti1_input_name{68}=['Ind_4'];
Ti1_input_name{69}=['Ind_5'];
Ti1_input_name{70}=['Ind_6'];
Ti1_input_name{71}=['Ind_7'];
Ti1_input_name{72}=['Ind_8'];
Ti_intup1(:,73:80)=LS_Med(:,6,:);
Ti_input_name{73}=['Med_1'];
Ti_input_name{74}=['Med_2'];
Ti_input_name{75}=['Med_3']; 
Ti_input_name{76}=['Med_4'];
Ti_input_name{77}=['Med_5'];
Ti_input_name{78}=['Med_6']; 
Ti_input_name{79}=['Med_7'];
Ti_input_name{80}=['Med_8'];
Ti1_intup1(:,73:80)=LS1_Med(:,6,:);
Ti1_input_name{73}=['Med_1'];
Ti1_input_name{74}=['Med_2'];
Ti1_input_name{75}=['Med_3'];
Ti1_input_name{76}=['Med_4'];
Ti1_input_name{77}=['Med_5'];
Ti1_input_name{78}=['Med_6'];
Ti1_input_name{79}=['Med_7'];
Ti1_input_name{80}=['Med_8'];
Ti_intup1(:,81:88)=LS_NPa(:,6,:);
Ti_input_name{81}=['NPa_1'];
Ti_input_name{82}=['NPa_2'];
Ti_input_name{83}=['NPa_3']; 
Ti_input_name{84}=['NPa_4'];
Ti_input_name{85}=['NPa_5'];
Ti_input_name{86}=['NPa_6']; 
Ti_input_name{87}=['NPa_7'];
Ti_input_name{88}=['NPa_8']; 
Ti1_intup1(:,81:88)=LS1_NPa(:,6,:);
Ti1_input_name{81}=['NPa_1'];
Ti1_input_name{82}=['NPa_2'];
Ti1_input_name{83}=['NPa_3'];
Ti1_input_name{84}=['NPa_4'];
Ti1_input_name{85}=['NPa_5'];
Ti1_input_name{86}=['NPa_6'];
Ti1_input_name{87}=['NPa_7'];
Ti1_input_name{88}=['NPa_8'];
Ti_intup1(:,89:96)=LS_NGB(:,6,:);
Ti_input_name{89}=['NGB_1'];
Ti_input_name{90}=['NGB_2'];
Ti_input_name{91}=['NGB_3']; 
Ti_input_name{92}=['NGB_4'];
Ti_input_name{93}=['NGB_5'];
Ti_input_name{94}=['NGB_6']; 
Ti_input_name{95}=['NGB_7'];
Ti_input_name{96}=['NGB_8'];
Ti1_intup1(:,89:96)=LS1_NGB(:,6,:);
Ti1_input_name{89}=['NGB_1'];
Ti1_input_name{90}=['NGB_2'];
Ti1_input_name{91}=['NGB_3'];
Ti1_input_name{92}=['NGB_4'];
Ti1_input_name{93}=['NGB_5'];
Ti1_input_name{94}=['NGB_6'];
Ti1_input_name{95}=['NGB_7'];
Ti1_input_name{96}=['NGB_8'];
Ti_intup1(:,97:104)=LS_NNAt(:,6,:);
Ti_input_name{97}=['NNAt_1'];
Ti_input_name{98}=['NNAt_2'];
Ti_input_name{99}=['NNAt_3']; 
Ti_input_name{100}=['NNAt_4'];
Ti_input_name{101}=['NNAt_5'];
Ti_input_name{102}=['NNAt_6']; 
Ti_input_name{103}=['NNAt_7']; 
Ti_input_name{104}=['NNAt_8'];
Ti1_intup1(:,97:104)=LS1_NNAt(:,6,:);
Ti1_input_name{97}=['NNAt_1'];
Ti1_input_name{98}=['NNAt_2'];
Ti1_input_name{99}=['NNAt_3'];
Ti1_input_name{100}=['NNAt_4'];
Ti1_input_name{101}=['NNAt_5'];
Ti1_input_name{102}=['NNAt_6'];
Ti1_input_name{103}=['NNAt_7'];
Ti1_input_name{104}=['NNAt_8'];
Ti_intup1(:,105:112)=LS_Pi_out(:,1,:);
Ti_input_name{105}=['CPC_11'];
Ti_input_name{106}=['CPC_12'];
Ti_input_name{107}=['CPC_13']; 
Ti_input_name{108}=['CPC_14'];
Ti_input_name{109}=['CPC_15'];
Ti_input_name{110}=['CPC_16']; 
Ti_input_name{111}=['CPC_17'];
Ti_input_name{112}=['CPC_18'];
Ti1_intup1(:,105:112)=LS1_Pi_out(:,1,:);
Ti1_input_name{105}=['CPC_11'];
Ti1_input_name{106}=['CPC_12'];
Ti1_input_name{107}=['CPC_13']; 
Ti1_input_name{108}=['CPC_14'];
Ti1_input_name{109}=['CPC_15'];
Ti1_input_name{110}=['CPC_16']; 
Ti1_input_name{111}=['CPC_17'];
Ti1_input_name{112}=['CPC_18'];
Ti_intup1(:,113:120)=LS_Pi_out(:,2,:);
Ti_input_name{113}=['CPC_21']; 
Ti_input_name{114}=['CPC_22']; 
Ti_input_name{115}=['CPC_23']; 
Ti_input_name{116}=['CPC_24']; 
Ti_input_name{117}=['CPC_25']; 
Ti_input_name{118}=['CPC_26']; 
Ti_input_name{119}=['CPC_27']; 
Ti_input_name{120}=['CPC_28']; 
Ti1_intup1(:,113:120)=LS1_Pi_out(:,2,:);
Ti1_input_name{113}=['CPC_21'];
Ti1_input_name{114}=['CPC_22'];
Ti1_input_name{115}=['CPC_23']; 
Ti1_input_name{116}=['CPC_24'];
Ti1_input_name{117}=['CPC_25'];
Ti1_input_name{118}=['CPC_26']; 
Ti1_input_name{119}=['CPC_27'];
Ti1_input_name{120}=['CPC_28'];
Ti_intup1(:,121:128)=LS_Pi_out(:,3,:);
Ti_input_name{121}=['CPC_31']; 
Ti_input_name{122}=['CPC_32']; 
Ti_input_name{123}=['CPC_33']; 
Ti_input_name{124}=['CPC_34']; 
Ti_input_name{125}=['CPC_35']; 
Ti_input_name{126}=['CPC_36']; 
Ti_input_name{127}=['CPC_37']; 
Ti_input_name{128}=['CPC_38']; 
Ti1_intup1(:,121:128)=LS1_Pi_out(:,3,:);
Ti1_input_name{121}=['CPC_31'];
Ti1_input_name{122}=['CPC_32'];
Ti1_input_name{123}=['CPC_33']; 
Ti1_input_name{124}=['CPC_34'];
Ti1_input_name{125}=['CPC_35'];
Ti1_input_name{126}=['CPC_36']; 
Ti1_input_name{127}=['CPC_37'];
Ti1_input_name{128}=['CPC_38']; 
Ti_intup1(:,129:136)=LS_Pi_out(:,4,:);
Ti_input_name{129}=['CPC_41'];
Ti_input_name{130}=['CPC_42'];
Ti_input_name{131}=['CPC_43']; 
Ti_input_name{132}=['CPC_44'];
Ti_input_name{133}=['CPC_45'];
Ti_input_name{134}=['CPC_46']; 
Ti_input_name{135}=['CPC_47'];
Ti_input_name{136}=['CPC_48'];
Ti1_intup1(:,129:136)=LS1_Pi_out(:,4,:);
Ti1_input_name{129}=['CPC_41'];
Ti1_input_name{130}=['CPC_42'];
Ti1_input_name{131}=['CPC_43']; 
Ti1_input_name{132}=['CPC_44'];
Ti1_input_name{133}=['CPC_45'];
Ti1_input_name{134}=['CPC_46']; 
Ti1_input_name{135}=['CPC_47'];
Ti1_input_name{136}=['CPC_48'];
Ti_intup1(:,137:144)=LS_Pi_out(:,5,:);
Ti_input_name{137}=['CPC_51']; 
Ti_input_name{138}=['CPC_52']; 
Ti_input_name{139}=['CPC_53']; 
Ti_input_name{140}=['CPC_54']; 
Ti_input_name{141}=['CPC_55']; 
Ti_input_name{142}=['CPC_56']; 
Ti_input_name{143}=['CPC_57']; 
Ti_input_name{144}=['CPC_58']; 
Ti1_intup1(:,137:144)=LS1_Pi_out(:,5,:);
Ti1_input_name{137}=['CPC_51'];
Ti1_input_name{138}=['CPC_52'];
Ti1_input_name{139}=['CPC_53']; 
Ti1_input_name{140}=['CPC_54'];
Ti1_input_name{141}=['CPC_55'];
Ti1_input_name{142}=['CPC_56']; 
Ti1_input_name{143}=['CPC_57'];
Ti1_input_name{144}=['CPC_58'];
Ti_intup1(:,145:152)=LS_Pi_out(:,6,:);
Ti_input_name{145}=['CPC_61']; 
Ti_input_name{146}=['CPC_62']; 
Ti_input_name{147}=['CPC_63']; 
Ti_input_name{148}=['CPC_64']; 
Ti_input_name{149}=['CPC_65']; 
Ti_input_name{140}=['CPC_66']; 
Ti_input_name{151}=['CPC_67']; 
Ti_input_name{152}=['CPC_68']; 
Ti1_intup1(:,145:152)=LS1_Pi_out(:,6,:);
Ti1_input_name{145}=['CPC_61'];
Ti1_input_name{146}=['CPC_62'];
Ti1_input_name{147}=['CPC_63']; 
Ti1_input_name{148}=['CPC_64'];
Ti1_input_name{149}=['CPC_65'];
Ti1_input_name{140}=['CPC_66']; 
Ti1_input_name{151}=['CPC_67'];
Ti1_input_name{152}=['CPC_68'];
Ti_intup1(:,153:160)=LS_Pi_out(:,7,:);
Ti_input_name{153}=['CPC_71'];
Ti_input_name{154}=['CPC_72'];
Ti_input_name{155}=['CPC_73']; 
Ti_input_name{156}=['CPC_74'];
Ti_input_name{157}=['CPC_75'];
Ti_input_name{158}=['CPC_76']; 
Ti_input_name{159}=['CPC_77'];
Ti_input_name{160}=['CPC_78'];
Ti1_intup1(:,153:160)=LS1_Pi_out(:,7,:);
Ti1_input_name{153}=['CPC_71'];
Ti1_input_name{154}=['CPC_72'];
Ti1_input_name{155}=['CPC_73']; 
Ti1_input_name{156}=['CPC_74'];
Ti1_input_name{157}=['CPC_75'];
Ti1_input_name{158}=['CPC_76']; 
Ti1_input_name{159}=['CPC_77'];
Ti1_input_name{160}=['CPC_78'];
Ti_intup1(:,161:168)=LS_Pi_out(:,8,:);
Ti_input_name{161}=['CPC_81']; 
Ti_input_name{162}=['CPC_82']; 
Ti_input_name{163}=['CPC_83']; 
Ti_input_name{164}=['CPC_84']; 
Ti_input_name{165}=['CPC_85']; 
Ti_input_name{166}=['CPC_86']; 
Ti_input_name{167}=['CPC_87']; 
Ti_input_name{168}=['CPC_88']; 
Ti1_intup1(:,161:168)=LS1_Pi_out(:,8,:);
Ti1_input_name{161}=['CPC_81'];
Ti1_input_name{162}=['CPC_82'];
Ti1_input_name{163}=['CPC_83']; 
Ti1_input_name{164}=['CPC_84'];
Ti1_input_name{165}=['CPC_85'];
Ti1_input_name{166}=['CPC_86']; 
Ti1_input_name{167}=['CPC_87'];
Ti1_input_name{168}=['CPC_88'];
% % %**************************************************************************
Tr_intup1(:,1:8)=LS_TEM(:,7,:);
Tr_input_name{1}=['TEM_1'];
Tr_input_name{2}=['TEM_2'];
Tr_input_name{3}=['TEM_3']; 
Tr_input_name{4}=['TEM_4'];
Tr_input_name{5}=['TEM_5'];
Tr_input_name{6}=['TEM_6']; 
Tr_input_name{7}=['TEM_7'];
Tr_input_name{8}=['TEM_8'];
Tr1_intup1(:,1:8)=LS1_TEM(:,7,:);
Tr1_input_name{1}=['TEM_1'];
Tr1_input_name{2}=['TEM_2'];
Tr1_input_name{3}=['TEM_3'];  
Tr1_input_name{4}=['TEM_4']; 
Tr1_input_name{5}=['TEM_5']; 
Tr1_input_name{6}=['TEM_6']; 
Tr1_input_name{7}=['TEM_7']; 
Tr1_input_name{8}=['TEM_8']; 
Tr_intup1(:,9:16)=LS_SAt(:,7,:);
Tr_input_name{9}=['SAt_1'];
Tr_input_name{10}=['SAt_2'];
Tr_input_name{11}=['SAt_3']; 
Tr_input_name{12}=['SAt_4'];
Tr_input_name{13}=['SAt_5'];
Tr_input_name{14}=['SAt_6']; 
Tr_input_name{15}=['SAt_7'];
Tr_input_name{16}=['SAt_8'];
Tr1_intup1(:,9:16)=LS1_SAt(:,7,:);
Tr1_input_name{9}=['SAt_1'];
Tr1_input_name{10}=['SAt_2'];
Tr1_input_name{11}=['SAt_3'];
Tr1_input_name{12}=['SAt_4'];
Tr1_input_name{13}=['SAt_5'];
Tr1_input_name{14}=['SAt_6'];
Tr1_input_name{15}=['SAt_7'];
Tr1_input_name{16}=['SAt_8'];
Tr_intup1(:,17:24)=LS_NAt(:,7,:);
Tr_input_name{17}=['NAt_1'];
Tr_input_name{18}=['NAt_2'];
Tr_input_name{19}=['NAt_3']; 
Tr_input_name{20}=['NAt_4'];
Tr_input_name{21}=['NAt_5'];
Tr_input_name{22}=['NAt_6'];
Tr_input_name{23}=['NAt_7'];
Tr_input_name{24}=['NAt_8'];
Tr1_intup1(:,17:24)=LS1_NAt(:,7,:);
Tr1_input_name{17}=['NAt_1'];
Tr1_input_name{18}=['NAt_2'];
Tr1_input_name{19}=['NAt_3']; 
Tr1_input_name{20}=['NAt_4'];
Tr1_input_name{21}=['NAt_5'];
Tr1_input_name{22}=['NAt_6']; 
Tr1_input_name{23}=['NAt_7'];
Tr1_input_name{24}=['NAt_8']; 
Tr_intup1(:,25:32)=LS_SPa(:,7,:);
Tr_input_name{25}=['SPa_1'];
Tr_input_name{26}=['SPa_2'];
Tr_input_name{27}=['SPa_3']; 
Tr_input_name{28}=['SPa_4'];
Tr_input_name{29}=['SPa_5'];
Tr_input_name{30}=['SPa_6'];
Tr_input_name{31}=['SPa_7'];
Tr_input_name{32}=['SPa_8'];
Tr1_intup1(:,25:32)=LS1_SPa(:,7,:);
Tr1_input_name{25}=['SPa_1'];
Tr1_input_name{26}=['SPa_2'];
Tr1_input_name{27}=['SPa_3'];
Tr1_input_name{28}=['SPa_4'];
Tr1_input_name{29}=['SPa_5'];
Tr1_input_name{30}=['SPa_6'];
Tr1_input_name{31}=['SPa_7'];
Tr1_input_name{32}=['SPa_8'];
Tr_intup1(:,33:40)=LS_Baltic(:,7,:);
Tr_input_name{33}=['Baltic_1'];
Tr_input_name{34}=['Baltic_2'];
Tr_input_name{35}=['Baltic_3']; 
Tr_input_name{36}=['Baltic_4'];
Tr_input_name{37}=['Baltic_5'];
Tr_input_name{38}=['Baltic_6']; 
Tr_input_name{39}=['Baltic_7'];
Tr_input_name{40}=['Baltic_8'];
Tr1_intup1(:,33:40)=LS1_Baltic(:,7,:);
Tr1_input_name{33}=['Baltic_1'];
Tr1_input_name{34}=['Baltic_2'];
Tr1_input_name{35}=['Baltic_3'];
Tr1_input_name{36}=['Baltic_4'];
Tr1_input_name{37}=['Baltic_5'];
Tr1_input_name{38}=['Baltic_6'];
Tr1_input_name{39}=['Baltic_7'];
Tr1_input_name{40}=['Baltic_8'];
Tr_intup1(:,41:48)=LS_CPC_M(:,7,:);
Tr_input_name{41}=['CPC_M_1'];
Tr_input_name{42}=['CPC_M_2'];
Tr_input_name{43}=['CPC_M_3']; 
Tr_input_name{44}=['CPC_M_4'];
Tr_input_name{45}=['CPC_M_5'];
Tr_input_name{46}=['CPC_M_6']; 
Tr_input_name{47}=['CPC_M_7'];
Tr_input_name{48}=['CPC_M_8'];
Tr1_intup1(:,41:48)=LS1_CPC_M(:,7,:);
Tr1_input_name{41}=['CPC_M_1'];
Tr1_input_name{42}=['CPC_M_2'];
Tr1_input_name{43}=['CPC_M_3'];
Tr1_input_name{44}=['CPC_M_4'];
Tr1_input_name{45}=['CPC_M_5'];
Tr1_input_name{46}=['CPC_M_6'];
Tr1_input_name{47}=['CPC_M_7'];
Tr1_input_name{48}=['CPC_M_8'];
Tr_intup1(:,49:56)=LS_Black(:,7,:);
Tr_input_name{49}=['Black_1'];
Tr_input_name{50}=['Black_2'];
Tr_input_name{51}=['Black_3']; 
Tr_input_name{52}=['Black_4'];
Tr_input_name{53}=['Black_5'];
Tr_input_name{54}=['Black_6']; 
Tr_input_name{55}=['Black_7'];
Tr_input_name{56}=['Black_8'];
Tr1_intup1(:,49:56)=LS1_Black(:,7,:);
Tr1_input_name{49}=['Black_1'];
Tr1_input_name{50}=['Black_2'];
Tr1_input_name{51}=['Black_3'];
Tr1_input_name{52}=['Black_4'];
Tr1_input_name{53}=['Black_5'];
Tr1_input_name{54}=['Black_6'];
Tr1_input_name{55}=['Black_7'];
Tr1_input_name{56}=['Black_8'];
Tr_intup1(:,57:64)=LS_Hudson(:,7,:);
Tr_input_name{57}=['Hudson_1'];
Tr_input_name{58}=['Hudson_2'];
Tr_input_name{59}=['Hudson_3']; 
Tr_input_name{60}=['Hudson_4'];
Tr_input_name{61}=['Hudson_5'];
Tr_input_name{62}=['Hudson_6']; 
Tr_input_name{63}=['Hudson_7'];
Tr_input_name{64}=['Hudson_8']; 
Tr1_intup1(:,57:64)=LS1_Hudson(:,7,:);
Tr1_input_name{57}=['Hudson_1'];
Tr1_input_name{58}=['Hudson_2'];
Tr1_input_name{59}=['Hudson_3'];
Tr1_input_name{60}=['Hudson_4'];
Tr1_input_name{61}=['Hudson_5'];
Tr1_input_name{62}=['Hudson_6'];
Tr1_input_name{63}=['Hudson_7'];
Tr1_input_name{64}=['Hudson_8'];
Tr_intup1(:,65:72)=LS_Ind(:,7,:);
Tr_input_name{65}=['Ind_1'];
Tr_input_name{66}=['Ind_2'];
Tr_input_name{67}=['Ind_3']; 
Tr_input_name{68}=['Ind_4'];
Tr_input_name{69}=['Ind_5'];
Tr_input_name{70}=['Ind_6']; 
Tr_input_name{71}=['Ind_7'];
Tr_input_name{72}=['Ind_8'];
Tr1_intup1(:,65:72)=LS1_Ind(:,7,:);
Tr1_input_name{65}=['Ind_1'];
Tr1_input_name{66}=['Ind_2'];
Tr1_input_name{67}=['Ind_3'];
Tr1_input_name{68}=['Ind_4'];
Tr1_input_name{69}=['Ind_5'];
Tr1_input_name{70}=['Ind_6'];
Tr1_input_name{71}=['Ind_7'];
Tr1_input_name{72}=['Ind_8'];
Tr_intup1(:,73:80)=LS_Med(:,7,:);
Tr_input_name{73}=['Med_1'];
Tr_input_name{74}=['Med_2'];
Tr_input_name{75}=['Med_3']; 
Tr_input_name{76}=['Med_4'];
Tr_input_name{77}=['Med_5'];
Tr_input_name{78}=['Med_6']; 
Tr_input_name{79}=['Med_7'];
Tr_input_name{80}=['Med_8'];
Tr1_intup1(:,73:80)=LS1_Med(:,7,:);
Tr1_input_name{73}=['Med_1'];
Tr1_input_name{74}=['Med_2'];
Tr1_input_name{75}=['Med_3'];
Tr1_input_name{76}=['Med_4'];
Tr1_input_name{77}=['Med_5'];
Tr1_input_name{78}=['Med_6'];
Tr1_input_name{79}=['Med_7'];
Tr1_input_name{80}=['Med_8'];
Tr_intup1(:,81:88)=LS_NPa(:,7,:);
Tr_input_name{81}=['NPa_1'];
Tr_input_name{82}=['NPa_2'];
Tr_input_name{83}=['NPa_3']; 
Tr_input_name{84}=['NPa_4'];
Tr_input_name{85}=['NPa_5'];
Tr_input_name{86}=['NPa_6']; 
Tr_input_name{87}=['NPa_7'];
Tr_input_name{88}=['NPa_8']; 
Tr1_intup1(:,81:88)=LS1_NPa(:,7,:);
Tr1_input_name{81}=['NPa_1'];
Tr1_input_name{82}=['NPa_2'];
Tr1_input_name{83}=['NPa_3'];
Tr1_input_name{84}=['NPa_4'];
Tr1_input_name{85}=['NPa_5'];
Tr1_input_name{86}=['NPa_6'];
Tr1_input_name{87}=['NPa_7'];
Tr1_input_name{88}=['NPa_8'];
Tr_intup1(:,89:96)=LS_NGB(:,7,:);
Tr_input_name{89}=['NGB_1'];
Tr_input_name{90}=['NGB_2'];
Tr_input_name{91}=['NGB_3']; 
Tr_input_name{92}=['NGB_4'];
Tr_input_name{93}=['NGB_5'];
Tr_input_name{94}=['NGB_6']; 
Tr_input_name{95}=['NGB_7'];
Tr_input_name{96}=['NGB_8'];
Tr1_intup1(:,89:96)=LS1_NGB(:,7,:);
Tr1_input_name{89}=['NGB_1'];
Tr1_input_name{90}=['NGB_2'];
Tr1_input_name{91}=['NGB_3'];
Tr1_input_name{92}=['NGB_4'];
Tr1_input_name{93}=['NGB_5'];
Tr1_input_name{94}=['NGB_6'];
Tr1_input_name{95}=['NGB_7'];
Tr1_input_name{96}=['NGB_8'];
Tr_intup1(:,97:104)=LS_NNAt(:,7,:);
Tr_input_name{97}=['NNAt_1'];
Tr_input_name{98}=['NNAt_2'];
Tr_input_name{99}=['NNAt_3']; 
Tr_input_name{100}=['NNAt_4'];
Tr_input_name{101}=['NNAt_5'];
Tr_input_name{102}=['NNAt_6']; 
Tr_input_name{103}=['NNAt_7']; 
Tr_input_name{104}=['NNAt_8'];
Tr1_intup1(:,97:104)=LS1_NNAt(:,7,:);
Tr1_input_name{97}=['NNAt_1'];
Tr1_input_name{98}=['NNAt_2'];
Tr1_input_name{99}=['NNAt_3'];
Tr1_input_name{100}=['NNAt_4'];
Tr1_input_name{101}=['NNAt_5'];
Tr1_input_name{102}=['NNAt_6'];
Tr1_input_name{103}=['NNAt_7'];
Tr1_input_name{104}=['NNAt_8'];
Tr_intup1(:,105:112)=LS_P_out(:,1,:);
Tr_input_name{105}=['CPC_11'];
Tr_input_name{106}=['CPC_12'];
Tr_input_name{107}=['CPC_13']; 
Tr_input_name{108}=['CPC_14'];
Tr_input_name{109}=['CPC_15'];
Tr_input_name{110}=['CPC_16']; 
Tr_input_name{111}=['CPC_17'];
Tr_input_name{112}=['CPC_18'];
Tr1_intup1(:,105:112)=LS1_P_out(:,1,:);
Tr1_input_name{105}=['CPC_11'];
Tr1_input_name{106}=['CPC_12'];
Tr1_input_name{107}=['CPC_13']; 
Tr1_input_name{108}=['CPC_14'];
Tr1_input_name{109}=['CPC_15'];
Tr1_input_name{110}=['CPC_16']; 
Tr1_input_name{111}=['CPC_17'];
Tr1_input_name{112}=['CPC_18'];
Tr_intup1(:,113:120)=LS_P_out(:,2,:);
Tr_input_name{113}=['CPC_21']; 
Tr_input_name{114}=['CPC_22']; 
Tr_input_name{115}=['CPC_23']; 
Tr_input_name{116}=['CPC_24']; 
Tr_input_name{117}=['CPC_25']; 
Tr_input_name{118}=['CPC_26']; 
Tr_input_name{119}=['CPC_27']; 
Tr_input_name{120}=['CPC_28']; 
Tr1_intup1(:,113:120)=LS1_P_out(:,2,:);
Tr1_input_name{113}=['CPC_21'];
Tr1_input_name{114}=['CPC_22'];
Tr1_input_name{115}=['CPC_23']; 
Tr1_input_name{116}=['CPC_24'];
Tr1_input_name{117}=['CPC_25'];
Tr1_input_name{118}=['CPC_26']; 
Tr1_input_name{119}=['CPC_27'];
Tr1_input_name{120}=['CPC_28'];
Tr_intup1(:,121:128)=LS_P_out(:,3,:);
Tr_input_name{121}=['CPC_31']; 
Tr_input_name{122}=['CPC_32']; 
Tr_input_name{123}=['CPC_33']; 
Tr_input_name{124}=['CPC_34']; 
Tr_input_name{125}=['CPC_35']; 
Tr_input_name{126}=['CPC_36']; 
Tr_input_name{127}=['CPC_37']; 
Tr_input_name{128}=['CPC_38']; 
Tr1_intup1(:,121:128)=LS1_P_out(:,3,:);
Tr1_input_name{121}=['CPC_31'];
Tr1_input_name{122}=['CPC_32'];
Tr1_input_name{123}=['CPC_33']; 
Tr1_input_name{124}=['CPC_34'];
Tr1_input_name{125}=['CPC_35'];
Tr1_input_name{126}=['CPC_36']; 
Tr1_input_name{127}=['CPC_37'];
Tr1_input_name{128}=['CPC_38']; 
Tr_intup1(:,129:136)=LS_P_out(:,4,:);
Tr_input_name{129}=['CPC_41'];
Tr_input_name{130}=['CPC_42'];
Tr_input_name{131}=['CPC_43']; 
Tr_input_name{132}=['CPC_44'];
Tr_input_name{133}=['CPC_45'];
Tr_input_name{134}=['CPC_46']; 
Tr_input_name{135}=['CPC_47'];
Tr_input_name{136}=['CPC_48'];
Tr1_intup1(:,129:136)=LS1_P_out(:,4,:);
Tr1_input_name{129}=['CPC_41'];
Tr1_input_name{130}=['CPC_42'];
Tr1_input_name{131}=['CPC_43']; 
Tr1_input_name{132}=['CPC_44'];
Tr1_input_name{133}=['CPC_45'];
Tr1_input_name{134}=['CPC_46']; 
Tr1_input_name{135}=['CPC_47'];
Tr1_input_name{136}=['CPC_48'];
Tr_intup1(:,137:144)=LS_P_out(:,5,:);
Tr_input_name{137}=['CPC_51']; 
Tr_input_name{138}=['CPC_52']; 
Tr_input_name{139}=['CPC_53']; 
Tr_input_name{140}=['CPC_54']; 
Tr_input_name{141}=['CPC_55']; 
Tr_input_name{142}=['CPC_56']; 
Tr_input_name{143}=['CPC_57']; 
Tr_input_name{144}=['CPC_58']; 
Tr1_intup1(:,137:144)=LS1_P_out(:,5,:);
Tr1_input_name{137}=['CPC_51'];
Tr1_input_name{138}=['CPC_52'];
Tr1_input_name{139}=['CPC_53']; 
Tr1_input_name{140}=['CPC_54'];
Tr1_input_name{141}=['CPC_55'];
Tr1_input_name{142}=['CPC_56']; 
Tr1_input_name{143}=['CPC_57'];
Tr1_input_name{144}=['CPC_58'];
Tr_intup1(:,145:152)=LS_P_out(:,6,:);
Tr_input_name{145}=['CPC_61']; 
Tr_input_name{146}=['CPC_62']; 
Tr_input_name{147}=['CPC_63']; 
Tr_input_name{148}=['CPC_64']; 
Tr_input_name{149}=['CPC_65']; 
Tr_input_name{140}=['CPC_66']; 
Tr_input_name{151}=['CPC_67']; 
Tr_input_name{152}=['CPC_68']; 
Tr1_intup1(:,145:152)=LS1_P_out(:,6,:);
Tr1_input_name{145}=['CPC_61'];
Tr1_input_name{146}=['CPC_62'];
Tr1_input_name{147}=['CPC_63']; 
Tr1_input_name{148}=['CPC_64'];
Tr1_input_name{149}=['CPC_65'];
Tr1_input_name{140}=['CPC_66']; 
Tr1_input_name{151}=['CPC_67'];
Tr1_input_name{152}=['CPC_68'];
Tr_intup1(:,153:160)=LS_P_out(:,7,:);
Tr_input_name{153}=['CPC_71'];
Tr_input_name{154}=['CPC_72'];
Tr_input_name{155}=['CPC_73']; 
Tr_input_name{156}=['CPC_74'];
Tr_input_name{157}=['CPC_75'];
Tr_input_name{158}=['CPC_76']; 
Tr_input_name{159}=['CPC_77'];
Tr_input_name{160}=['CPC_78'];
Tr1_intup1(:,153:160)=LS1_P_out(:,7,:);
Tr1_input_name{153}=['CPC_71'];
Tr1_input_name{154}=['CPC_72'];
Tr1_input_name{155}=['CPC_73']; 
Tr1_input_name{156}=['CPC_74'];
Tr1_input_name{157}=['CPC_75'];
Tr1_input_name{158}=['CPC_76']; 
Tr1_input_name{159}=['CPC_77'];
Tr1_input_name{160}=['CPC_78'];
Tr_intup1(:,161:168)=LS_P_out(:,8,:);
Tr_input_name{161}=['CPC_81']; 
Tr_input_name{162}=['CPC_82']; 
Tr_input_name{163}=['CPC_83']; 
Tr_input_name{164}=['CPC_84']; 
Tr_input_name{165}=['CPC_85']; 
Tr_input_name{166}=['CPC_86']; 
Tr_input_name{167}=['CPC_87']; 
Tr_input_name{168}=['CPC_88']; 
Tr1_intup1(:,161:168)=LS1_P_out(:,8,:);
Tr1_input_name{161}=['CPC_81'];
Tr1_input_name{162}=['CPC_82'];
Tr1_input_name{163}=['CPC_83']; 
Tr1_input_name{164}=['CPC_84'];
Tr1_input_name{165}=['CPC_85'];
Tr1_input_name{166}=['CPC_86']; 
Tr1_input_name{167}=['CPC_87'];
Tr1_input_name{168}=['CPC_88'];
% % %**************************************************************************
Ts_intup1(:,1:8)=LS_TEM(:,3,:);
Ts_input_name{1}=['TEM_1'];
Ts_input_name{2}=['TEM_2'];
Ts_input_name{3}=['TEM_3']; 
Ts_input_name{4}=['TEM_4'];
Ts_input_name{5}=['TEM_5'];
Ts_input_name{6}=['TEM_6']; 
Ts_input_name{7}=['TEM_7'];
Ts_input_name{8}=['TEM_8'];
Ts1_intup1(:,1:8)=LS1_TEM(:,3,:);
Ts1_input_name{1}=['TEM_1'];
Ts1_input_name{2}=['TEM_2'];
Ts1_input_name{3}=['TEM_3'];  
Ts1_input_name{4}=['TEM_4']; 
Ts1_input_name{5}=['TEM_5']; 
Ts1_input_name{6}=['TEM_6']; 
Ts1_input_name{7}=['TEM_7']; 
Ts1_input_name{8}=['TEM_8']; 
Ts_intup1(:,9:16)=LS_SAt(:,3,:);
Ts_input_name{9}=['SAt_1'];
Ts_input_name{10}=['SAt_2'];
Ts_input_name{11}=['SAt_3']; 
Ts_input_name{12}=['SAt_4'];
Ts_input_name{13}=['SAt_5'];
Ts_input_name{14}=['SAt_6']; 
Ts_input_name{15}=['SAt_7'];
Ts_input_name{16}=['SAt_8'];
Ts1_intup1(:,9:16)=LS1_SAt(:,3,:);
Ts1_input_name{9}=['SAt_1'];
Ts1_input_name{10}=['SAt_2'];
Ts1_input_name{11}=['SAt_3'];
Ts1_input_name{12}=['SAt_4'];
Ts1_input_name{13}=['SAt_5'];
Ts1_input_name{14}=['SAt_6'];
Ts1_input_name{15}=['SAt_7'];
Ts1_input_name{16}=['SAt_8'];
Ts_intup1(:,17:24)=LS_NAt(:,3,:);
Ts_input_name{17}=['NAt_1'];
Ts_input_name{18}=['NAt_2'];
Ts_input_name{19}=['NAt_3']; 
Ts_input_name{20}=['NAt_4'];
Ts_input_name{21}=['NAt_5'];
Ts_input_name{22}=['NAt_6'];
Ts_input_name{23}=['NAt_7'];
Ts_input_name{24}=['NAt_8'];
Ts1_intup1(:,17:24)=LS1_NAt(:,3,:);
Ts1_input_name{17}=['NAt_1'];
Ts1_input_name{18}=['NAt_2'];
Ts1_input_name{19}=['NAt_3']; 
Ts1_input_name{20}=['NAt_4'];
Ts1_input_name{21}=['NAt_5'];
Ts1_input_name{22}=['NAt_6']; 
Ts1_input_name{23}=['NAt_7'];
Ts1_input_name{24}=['NAt_8']; 
Ts_intup1(:,25:32)=LS_SPa(:,3,:);
Ts_input_name{25}=['SPa_1'];
Ts_input_name{26}=['SPa_2'];
Ts_input_name{27}=['SPa_3']; 
Ts_input_name{28}=['SPa_4'];
Ts_input_name{29}=['SPa_5'];
Ts_input_name{30}=['SPa_6'];
Ts_input_name{31}=['SPa_7'];
Ts_input_name{32}=['SPa_8'];
Ts1_intup1(:,25:32)=LS1_SPa(:,3,:);
Ts1_input_name{25}=['SPa_1'];
Ts1_input_name{26}=['SPa_2'];
Ts1_input_name{27}=['SPa_3'];
Ts1_input_name{28}=['SPa_4'];
Ts1_input_name{29}=['SPa_5'];
Ts1_input_name{30}=['SPa_6'];
Ts1_input_name{31}=['SPa_7'];
Ts1_input_name{32}=['SPa_8'];
Ts_intup1(:,33:40)=LS_Baltic(:,3,:);
Ts_input_name{33}=['Baltic_1'];
Ts_input_name{34}=['Baltic_2'];
Ts_input_name{35}=['Baltic_3']; 
Ts_input_name{36}=['Baltic_4'];
Ts_input_name{37}=['Baltic_5'];
Ts_input_name{38}=['Baltic_6']; 
Ts_input_name{39}=['Baltic_7'];
Ts_input_name{40}=['Baltic_8'];
Ts1_intup1(:,33:40)=LS1_Baltic(:,3,:);
Ts1_input_name{33}=['Baltic_1'];
Ts1_input_name{34}=['Baltic_2'];
Ts1_input_name{35}=['Baltic_3'];
Ts1_input_name{36}=['Baltic_4'];
Ts1_input_name{37}=['Baltic_5'];
Ts1_input_name{38}=['Baltic_6'];
Ts1_input_name{39}=['Baltic_7'];
Ts1_input_name{40}=['Baltic_8'];
Ts_intup1(:,41:48)=LS_CPC_M(:,3,:);
Ts_input_name{41}=['CPC_M_1'];
Ts_input_name{42}=['CPC_M_2'];
Ts_input_name{43}=['CPC_M_3']; 
Ts_input_name{44}=['CPC_M_4'];
Ts_input_name{45}=['CPC_M_5'];
Ts_input_name{46}=['CPC_M_6']; 
Ts_input_name{47}=['CPC_M_7'];
Ts_input_name{48}=['CPC_M_8'];
Ts1_intup1(:,41:48)=LS1_CPC_M(:,3,:);
Ts1_input_name{41}=['CPC_M_1'];
Ts1_input_name{42}=['CPC_M_2'];
Ts1_input_name{43}=['CPC_M_3'];
Ts1_input_name{44}=['CPC_M_4'];
Ts1_input_name{45}=['CPC_M_5'];
Ts1_input_name{46}=['CPC_M_6'];
Ts1_input_name{47}=['CPC_M_7'];
Ts1_input_name{48}=['CPC_M_8'];
Ts_intup1(:,49:56)=LS_Black(:,3,:);
Ts_input_name{49}=['Black_1'];
Ts_input_name{50}=['Black_2'];
Ts_input_name{51}=['Black_3']; 
Ts_input_name{52}=['Black_4'];
Ts_input_name{53}=['Black_5'];
Ts_input_name{54}=['Black_6']; 
Ts_input_name{55}=['Black_7'];
Ts_input_name{56}=['Black_8'];
Ts1_intup1(:,49:56)=LS1_Black(:,3,:);
Ts1_input_name{49}=['Black_1'];
Ts1_input_name{50}=['Black_2'];
Ts1_input_name{51}=['Black_3'];
Ts1_input_name{52}=['Black_4'];
Ts1_input_name{53}=['Black_5'];
Ts1_input_name{54}=['Black_6'];
Ts1_input_name{55}=['Black_7'];
Ts1_input_name{56}=['Black_8'];
Ts_intup1(:,57:64)=LS_Hudson(:,3,:);
Ts_input_name{57}=['Hudson_1'];
Ts_input_name{58}=['Hudson_2'];
Ts_input_name{59}=['Hudson_3']; 
Ts_input_name{60}=['Hudson_4'];
Ts_input_name{61}=['Hudson_5'];
Ts_input_name{62}=['Hudson_6']; 
Ts_input_name{63}=['Hudson_7'];
Ts_input_name{64}=['Hudson_8']; 
Ts1_intup1(:,57:64)=LS1_Hudson(:,3,:);
Ts1_input_name{57}=['Hudson_1'];
Ts1_input_name{58}=['Hudson_2'];
Ts1_input_name{59}=['Hudson_3'];
Ts1_input_name{60}=['Hudson_4'];
Ts1_input_name{61}=['Hudson_5'];
Ts1_input_name{62}=['Hudson_6'];
Ts1_input_name{63}=['Hudson_7'];
Ts1_input_name{64}=['Hudson_8'];
Ts_intup1(:,65:72)=LS_Ind(:,3,:);
Ts_input_name{65}=['Ind_1'];
Ts_input_name{66}=['Ind_2'];
Ts_input_name{67}=['Ind_3']; 
Ts_input_name{68}=['Ind_4'];
Ts_input_name{69}=['Ind_5'];
Ts_input_name{70}=['Ind_6']; 
Ts_input_name{71}=['Ind_7'];
Ts_input_name{72}=['Ind_8'];
Ts1_intup1(:,65:72)=LS1_Ind(:,3,:);
Ts1_input_name{65}=['Ind_1'];
Ts1_input_name{66}=['Ind_2'];
Ts1_input_name{67}=['Ind_3'];
Ts1_input_name{68}=['Ind_4'];
Ts1_input_name{69}=['Ind_5'];
Ts1_input_name{70}=['Ind_6'];
Ts1_input_name{71}=['Ind_7'];
Ts1_input_name{72}=['Ind_8'];
Ts_intup1(:,73:80)=LS_Med(:,3,:);
Ts_input_name{73}=['Med_1'];
Ts_input_name{74}=['Med_2'];
Ts_input_name{75}=['Med_3']; 
Ts_input_name{76}=['Med_4'];
Ts_input_name{77}=['Med_5'];
Ts_input_name{78}=['Med_6']; 
Ts_input_name{79}=['Med_7'];
Ts_input_name{80}=['Med_8'];
Ts1_intup1(:,73:80)=LS1_Med(:,3,:);
Ts1_input_name{73}=['Med_1'];
Ts1_input_name{74}=['Med_2'];
Ts1_input_name{75}=['Med_3'];
Ts1_input_name{76}=['Med_4'];
Ts1_input_name{77}=['Med_5'];
Ts1_input_name{78}=['Med_6'];
Ts1_input_name{79}=['Med_7'];
Ts1_input_name{80}=['Med_8'];
Ts_intup1(:,81:88)=LS_NPa(:,6,:);
Ts_input_name{81}=['NPa_1'];
Ts_input_name{82}=['NPa_2'];
Ts_input_name{83}=['NPa_3']; 
Ts_input_name{84}=['NPa_4'];
Ts_input_name{85}=['NPa_5'];
Ts_input_name{86}=['NPa_6']; 
Ts_input_name{87}=['NPa_7'];
Ts_input_name{88}=['NPa_8']; 
Ts1_intup1(:,81:88)=LS1_NPa(:,3,:);
Ts1_input_name{81}=['NPa_1'];
Ts1_input_name{82}=['NPa_2'];
Ts1_input_name{83}=['NPa_3'];
Ts1_input_name{84}=['NPa_4'];
Ts1_input_name{85}=['NPa_5'];
Ts1_input_name{86}=['NPa_6'];
Ts1_input_name{87}=['NPa_7'];
Ts1_input_name{88}=['NPa_8'];
Ts_intup1(:,89:96)=LS_NGB(:,3,:);
Ts_input_name{89}=['NGB_1'];
Ts_input_name{90}=['NGB_2'];
Ts_input_name{91}=['NGB_3']; 
Ts_input_name{92}=['NGB_4'];
Ts_input_name{93}=['NGB_5'];
Ts_input_name{94}=['NGB_6']; 
Ts_input_name{95}=['NGB_7'];
Ts_input_name{96}=['NGB_8'];
Ts1_intup1(:,89:96)=LS1_NGB(:,3,:);
Ts1_input_name{89}=['NGB_1'];
Ts1_input_name{90}=['NGB_2'];
Ts1_input_name{91}=['NGB_3'];
Ts1_input_name{92}=['NGB_4'];
Ts1_input_name{93}=['NGB_5'];
Ts1_input_name{94}=['NGB_6'];
Ts1_input_name{95}=['NGB_7'];
Ts1_input_name{96}=['NGB_8'];
Ts_intup1(:,97:104)=LS_NNAt(:,3,:);
Ts_input_name{97}=['NNAt_1'];
Ts_input_name{98}=['NNAt_2'];
Ts_input_name{99}=['NNAt_3']; 
Ts_input_name{100}=['NNAt_4'];
Ts_input_name{101}=['NNAt_5'];
Ts_input_name{102}=['NNAt_6']; 
Ts_input_name{103}=['NNAt_7']; 
Ts_input_name{104}=['NNAt_8'];
Ts1_intup1(:,97:104)=LS1_NNAt(:,3,:);
Ts1_input_name{97}=['NNAt_1'];
Ts1_input_name{98}=['NNAt_2'];
Ts1_input_name{99}=['NNAt_3'];
Ts1_input_name{100}=['NNAt_4'];
Ts1_input_name{101}=['NNAt_5'];
Ts1_input_name{102}=['NNAt_6'];
Ts1_input_name{103}=['NNAt_7'];
Ts1_input_name{104}=['NNAt_8'];
ir=168;
ss=104;
elseif mode==9
Ti_intup1(:,1:9)=LS_TEM(:,6,:);
Ti_input_name{1}=['TEM_1'];
Ti_input_name{2}=['TEM_2'];
Ti_input_name{3}=['TEM_3']; 
Ti_input_name{4}=['TEM_4'];
Ti_input_name{5}=['TEM_5'];
Ti_input_name{6}=['TEM_6']; 
Ti_input_name{7}=['TEM_7'];
Ti_input_name{8}=['TEM_8'];
Ti_input_name{9}=['TEM_9']; 
Ti1_intup1(:,1:9)=LS1_TEM(:,6,:);
Ti1_input_name{1}=['TEM_1'];
Ti1_input_name{2}=['TEM_2'];
Ti1_input_name{3}=['TEM_3'];  
Ti1_input_name{4}=['TEM_4']; 
Ti1_input_name{5}=['TEM_5']; 
Ti1_input_name{6}=['TEM_6']; 
Ti1_input_name{7}=['TEM_7']; 
Ti1_input_name{8}=['TEM_8']; 
Ti1_input_name{9}=['TEM_9']; 
Ti_intup1(:,10:18)=LS_SAt(:,6,:);
Ti_input_name{10}=['SAt_1'];
Ti_input_name{11}=['SAt_2'];
Ti_input_name{12}=['SAt_3']; 
Ti_input_name{13}=['SAt_4'];
Ti_input_name{14}=['SAt_5'];
Ti_input_name{15}=['SAt_6']; 
Ti_input_name{16}=['SAt_7'];
Ti_input_name{17}=['SAt_8'];
Ti_input_name{18}=['SAt_9']; 
Ti1_intup1(:,10:18)=LS1_SAt(:,6,:);
Ti1_input_name{10}=['SAt_1'];
Ti1_input_name{11}=['SAt_2'];
Ti1_input_name{12}=['SAt_3'];
Ti1_input_name{13}=['SAt_4'];
Ti1_input_name{14}=['SAt_5'];
Ti1_input_name{15}=['SAt_6'];
Ti1_input_name{16}=['SAt_7'];
Ti1_input_name{17}=['SAt_8'];
Ti1_input_name{18}=['SAt_9'];
Ti_intup1(:,19:27)=LS_NAt(:,6,:);
Ti_input_name{19}=['NAt_1'];
Ti_input_name{20}=['NAt_2'];
Ti_input_name{21}=['NAt_3']; 
Ti_input_name{22}=['NAt_4'];
Ti_input_name{23}=['NAt_5'];
Ti_input_name{24}=['NAt_6'];
Ti_input_name{25}=['NAt_7'];
Ti_input_name{26}=['NAt_8'];
Ti_input_name{27}=['NAt_9'];
Ti1_intup1(:,19:27)=LS1_NAt(:,6,:);
Ti1_input_name{19}=['NAt_1'];
Ti1_input_name{20}=['NAt_2'];
Ti1_input_name{21}=['NAt_3']; 
Ti1_input_name{22}=['NAt_4'];
Ti1_input_name{23}=['NAt_5'];
Ti1_input_name{24}=['NAt_6']; 
Ti1_input_name{25}=['NAt_7'];
Ti1_input_name{26}=['NAt_8'];
Ti1_input_name{27}=['NAt_9'];  
Ti_intup1(:,28:36)=LS_SPa(:,6,:);
Ti_input_name{28}=['SPa_1'];
Ti_input_name{29}=['SPa_2'];
Ti_input_name{30}=['SPa_3']; 
Ti_input_name{31}=['SPa_4'];
Ti_input_name{32}=['SPa_5'];
Ti_input_name{33}=['SPa_6'];
Ti_input_name{34}=['SPa_7'];
Ti_input_name{35}=['SPa_8'];
Ti_input_name{36}=['SPa_9'];
Ti1_intup1(:,28:36)=LS1_SPa(:,6,:);
Ti1_input_name{28}=['SPa_1'];
Ti1_input_name{29}=['SPa_2'];
Ti1_input_name{30}=['SPa_3'];
Ti1_input_name{31}=['SPa_4'];
Ti1_input_name{32}=['SPa_5'];
Ti1_input_name{33}=['SPa_6'];
Ti1_input_name{34}=['SPa_7'];
Ti1_input_name{35}=['SPa_8'];
Ti1_input_name{36}=['SPa_9'];
Ti_intup1(:,37:45)=LS_Baltic(:,6,:);
Ti_input_name{37}=['Baltic_1'];
Ti_input_name{38}=['Baltic_2'];
Ti_input_name{39}=['Baltic_3']; 
Ti_input_name{40}=['Baltic_4'];
Ti_input_name{41}=['Baltic_5'];
Ti_input_name{42}=['Baltic_6']; 
Ti_input_name{43}=['Baltic_7'];
Ti_input_name{44}=['Baltic_8'];
Ti_input_name{45}=['Baltic_9']; 
Ti1_intup1(:,37:45)=LS1_Baltic(:,6,:);
Ti1_input_name{37}=['Baltic_1'];
Ti1_input_name{38}=['Baltic_2'];
Ti1_input_name{39}=['Baltic_3'];
Ti1_input_name{40}=['Baltic_4'];
Ti1_input_name{41}=['Baltic_5'];
Ti1_input_name{42}=['Baltic_6'];
Ti1_input_name{43}=['Baltic_7'];
Ti1_input_name{44}=['Baltic_8'];
Ti1_input_name{45}=['Baltic_9'];
Ti_intup1(:,46:54)=LS_CPC_M(:,6,:);
Ti_input_name{46}=['CPC_M_1'];
Ti_input_name{47}=['CPC_M_2'];
Ti_input_name{48}=['CPC_M_3']; 
Ti_input_name{49}=['CPC_M_4'];
Ti_input_name{50}=['CPC_M_5'];
Ti_input_name{51}=['CPC_M_6']; 
Ti_input_name{52}=['CPC_M_7'];
Ti_input_name{53}=['CPC_M_8'];
Ti_input_name{54}=['CPC_M_9']; 
Ti1_intup1(:,46:54)=LS1_CPC_M(:,6,:);
Ti1_input_name{46}=['CPC_M_1'];
Ti1_input_name{47}=['CPC_M_2'];
Ti1_input_name{48}=['CPC_M_3'];
Ti1_input_name{49}=['CPC_M_4'];
Ti1_input_name{50}=['CPC_M_5'];
Ti1_input_name{51}=['CPC_M_6'];
Ti1_input_name{52}=['CPC_M_7'];
Ti1_input_name{53}=['CPC_M_8'];
Ti1_input_name{54}=['CPC_M_9'];
Ti_intup1(:,55:63)=LS_Black(:,6,:);
Ti_input_name{55}=['Black_1'];
Ti_input_name{56}=['Black_2'];
Ti_input_name{57}=['Black_3']; 
Ti_input_name{58}=['Black_4'];
Ti_input_name{59}=['Black_5'];
Ti_input_name{60}=['Black_6']; 
Ti_input_name{61}=['Black_7'];
Ti_input_name{62}=['Black_8'];
Ti_input_name{63}=['Black_9']; 
Ti1_intup1(:,55:63)=LS1_Black(:,6,:);
Ti1_input_name{55}=['Black_1'];
Ti1_input_name{56}=['Black_2'];
Ti1_input_name{57}=['Black_3'];
Ti1_input_name{58}=['Black_4'];
Ti1_input_name{59}=['Black_5'];
Ti1_input_name{60}=['Black_6'];
Ti1_input_name{61}=['Black_7'];
Ti1_input_name{62}=['Black_8'];
Ti1_input_name{63}=['Black_9'];
Ti_intup1(:,64:72)=LS_Hudson(:,6,:);
Ti_input_name{64}=['Hudson_1'];
Ti_input_name{65}=['Hudson_2'];
Ti_input_name{66}=['Hudson_3']; 
Ti_input_name{67}=['Hudson_4'];
Ti_input_name{68}=['Hudson_5'];
Ti_input_name{69}=['Hudson_6']; 
Ti_input_name{70}=['Hudson_7'];
Ti_input_name{71}=['Hudson_8'];
Ti_input_name{72}=['Hudson_9']; 
Ti1_intup1(:,64:72)=LS1_Hudson(:,6,:);
Ti1_input_name{64}=['Hudson_1'];
Ti1_input_name{65}=['Hudson_2'];
Ti1_input_name{66}=['Hudson_3'];
Ti1_input_name{67}=['Hudson_4'];
Ti1_input_name{68}=['Hudson_5'];
Ti1_input_name{69}=['Hudson_6'];
Ti1_input_name{70}=['Hudson_7'];
Ti1_input_name{71}=['Hudson_8'];
Ti1_input_name{72}=['Hudson_9'];
Ti_intup1(:,73:81)=LS_Ind(:,6,:);
Ti_input_name{73}=['Ind_1'];
Ti_input_name{74}=['Ind_2'];
Ti_input_name{75}=['Ind_3']; 
Ti_input_name{76}=['Ind_4'];
Ti_input_name{77}=['Ind_5'];
Ti_input_name{78}=['Ind_6']; 
Ti_input_name{79}=['Ind_7'];
Ti_input_name{80}=['Ind_8'];
Ti_input_name{81}=['Ind_9']; 
Ti1_intup1(:,73:81)=LS1_Ind(:,6,:);
Ti1_input_name{73}=['Ind_1'];
Ti1_input_name{74}=['Ind_2'];
Ti1_input_name{75}=['Ind_3'];
Ti1_input_name{76}=['Ind_4'];
Ti1_input_name{77}=['Ind_5'];
Ti1_input_name{78}=['Ind_6'];
Ti1_input_name{79}=['Ind_7'];
Ti1_input_name{80}=['Ind_8'];
Ti1_input_name{81}=['Ind_9'];
Ti_intup1(:,82:90)=LS_Med(:,6,:);
Ti_input_name{82}=['Med_1'];
Ti_input_name{83}=['Med_2'];
Ti_input_name{84}=['Med_3']; 
Ti_input_name{85}=['Med_4'];
Ti_input_name{86}=['Med_5'];
Ti_input_name{87}=['Med_6']; 
Ti_input_name{88}=['Med_7'];
Ti_input_name{89}=['Med_8'];
Ti_input_name{90}=['Med_9']; 
Ti1_intup1(:,82:90)=LS1_Med(:,6,:);
Ti1_input_name{82}=['Med_1'];
Ti1_input_name{83}=['Med_2'];
Ti1_input_name{84}=['Med_3'];
Ti1_input_name{85}=['Med_4'];
Ti1_input_name{86}=['Med_5'];
Ti1_input_name{87}=['Med_6'];
Ti1_input_name{88}=['Med_7'];
Ti1_input_name{89}=['Med_8'];
Ti1_input_name{90}=['Med_9'];
Ti_intup1(:,91:99)=LS_NPa(:,6,:);
Ti_input_name{91}=['NPa_1'];
Ti_input_name{92}=['NPa_2'];
Ti_input_name{93}=['NPa_3']; 
Ti_input_name{94}=['NPa_4'];
Ti_input_name{95}=['NPa_5'];
Ti_input_name{96}=['NPa_6']; 
Ti_input_name{97}=['NPa_7'];
Ti_input_name{98}=['NPa_8'];
Ti_input_name{99}=['NPa_9']; 
Ti1_intup1(:,91:99)=LS1_NPa(:,6,:);
Ti1_input_name{91}=['NPa_1'];
Ti1_input_name{92}=['NPa_2'];
Ti1_input_name{93}=['NPa_3'];
Ti1_input_name{94}=['NPa_4'];
Ti1_input_name{95}=['NPa_5'];
Ti1_input_name{96}=['NPa_6'];
Ti1_input_name{97}=['NPa_7'];
Ti1_input_name{98}=['NPa_8'];
Ti1_input_name{99}=['NPa_9'];
Ti_intup1(:,100:108)=LS_NGB(:,6,:);
Ti_input_name{100}=['NGB_1'];
Ti_input_name{101}=['NGB_2'];
Ti_input_name{102}=['NGB_3']; 
Ti_input_name{103}=['NGB_4'];
Ti_input_name{104}=['NGB_5'];
Ti_input_name{105}=['NGB_6']; 
Ti_input_name{106}=['NGB_7'];
Ti_input_name{107}=['NGB_8'];
Ti_input_name{108}=['NGB_9']; 
Ti1_intup1(:,100:108)=LS1_NGB(:,6,:);
Ti1_input_name{100}=['NGB_1'];
Ti1_input_name{101}=['NGB_2'];
Ti1_input_name{102}=['NGB_3'];
Ti1_input_name{103}=['NGB_4'];
Ti1_input_name{104}=['NGB_5'];
Ti1_input_name{105}=['NGB_6'];
Ti1_input_name{106}=['NGB_7'];
Ti1_input_name{107}=['NGB_8'];
Ti1_input_name{108}=['NGB_9'];
Ti_intup1(:,109:117)=LS_NNAt(:,6,:);
Ti_input_name{109}=['NNAt_1'];
Ti_input_name{110}=['NNAt_2'];
Ti_input_name{111}=['NNAt_3']; 
Ti_input_name{112}=['NNAt_4'];
Ti_input_name{113}=['NNAt_5'];
Ti_input_name{114}=['NNAt_6']; 
Ti_input_name{115}=['NNAt_7']; 
Ti_input_name{116}=['NNAt_8'];
Ti_input_name{117}=['NNAt_9'];
Ti1_intup1(:,109:117)=LS1_NNAt(:,6,:);
Ti1_input_name{109}=['NNAt_1'];
Ti1_input_name{110}=['NNAt_2'];
Ti1_input_name{111}=['NNAt_3'];
Ti1_input_name{112}=['NNAt_4'];
Ti1_input_name{113}=['NNAt_5'];
Ti1_input_name{114}=['NNAt_6'];
Ti1_input_name{115}=['NNAt_7'];
Ti1_input_name{116}=['NNAt_8'];
Ti1_input_name{117}=['NNAt_9'];
Ti_intup1(:,118:126)=LS_Pi_out(:,1,:);
Ti_input_name{118}=['CPC_11'];
Ti_input_name{119}=['CPC_12'];
Ti_input_name{120}=['CPC_13']; 
Ti_input_name{121}=['CPC_14'];
Ti_input_name{122}=['CPC_15'];
Ti_input_name{123}=['CPC_16']; 
Ti_input_name{124}=['CPC_17'];
Ti_input_name{125}=['CPC_18'];
Ti_input_name{126}=['CPC_19']; 
Ti1_intup1(:,118:126)=LS1_Pi_out(:,1,:);
Ti1_input_name{118}=['CPC_11'];
Ti1_input_name{119}=['CPC_12'];
Ti1_input_name{120}=['CPC_13']; 
Ti1_input_name{121}=['CPC_14'];
Ti1_input_name{122}=['CPC_15'];
Ti1_input_name{123}=['CPC_16']; 
Ti1_input_name{124}=['CPC_17'];
Ti1_input_name{125}=['CPC_18'];
Ti1_input_name{126}=['CPC_19']; 
Ti_intup1(:,127:135)=LS_Pi_out(:,2,:);
Ti_input_name{127}=['CPC_21']; 
Ti_input_name{128}=['CPC_22']; 
Ti_input_name{129}=['CPC_23']; 
Ti_input_name{130}=['CPC_24']; 
Ti_input_name{131}=['CPC_25']; 
Ti_input_name{132}=['CPC_26']; 
Ti_input_name{133}=['CPC_27']; 
Ti_input_name{134}=['CPC_28']; 
Ti_input_name{135}=['CPC_29']; 
Ti1_intup1(:,127:135)=LS1_Pi_out(:,2,:);
Ti1_input_name{127}=['CPC_21'];
Ti1_input_name{128}=['CPC_22'];
Ti1_input_name{129}=['CPC_23']; 
Ti1_input_name{130}=['CPC_24'];
Ti1_input_name{131}=['CPC_25'];
Ti1_input_name{132}=['CPC_26']; 
Ti1_input_name{133}=['CPC_27'];
Ti1_input_name{134}=['CPC_28'];
Ti1_input_name{135}=['CPC_29']; 
Ti_intup1(:,136:144)=LS_Pi_out(:,3,:);
Ti_input_name{136}=['CPC_31']; 
Ti_input_name{137}=['CPC_32']; 
Ti_input_name{138}=['CPC_33']; 
Ti_input_name{139}=['CPC_34']; 
Ti_input_name{140}=['CPC_35']; 
Ti_input_name{141}=['CPC_36']; 
Ti_input_name{142}=['CPC_37']; 
Ti_input_name{143}=['CPC_38']; 
Ti_input_name{144}=['CPC_39']; 
Ti1_intup1(:,136:144)=LS1_Pi_out(:,3,:);
Ti1_input_name{136}=['CPC_31'];
Ti1_input_name{137}=['CPC_32'];
Ti1_input_name{138}=['CPC_33']; 
Ti1_input_name{139}=['CPC_34'];
Ti1_input_name{140}=['CPC_35'];
Ti1_input_name{141}=['CPC_36']; 
Ti1_input_name{142}=['CPC_37'];
Ti1_input_name{143}=['CPC_38'];
Ti1_input_name{144}=['CPC_39']; 
Ti_intup1(:,145:153)=LS_Pi_out(:,4,:);
Ti_input_name{145}=['CPC_41'];
Ti_input_name{146}=['CPC_42'];
Ti_input_name{147}=['CPC_43']; 
Ti_input_name{148}=['CPC_44'];
Ti_input_name{149}=['CPC_45'];
Ti_input_name{150}=['CPC_46']; 
Ti_input_name{151}=['CPC_47'];
Ti_input_name{152}=['CPC_48'];
Ti_input_name{153}=['CPC_49']; 
Ti1_intup1(:,145:153)=LS1_Pi_out(:,4,:);
Ti1_input_name{145}=['CPC_41'];
Ti1_input_name{146}=['CPC_42'];
Ti1_input_name{147}=['CPC_43']; 
Ti1_input_name{148}=['CPC_44'];
Ti1_input_name{149}=['CPC_45'];
Ti1_input_name{150}=['CPC_46']; 
Ti1_input_name{151}=['CPC_47'];
Ti1_input_name{152}=['CPC_48'];
Ti1_input_name{153}=['CPC_49']; 
Ti_intup1(:,154:162)=LS_Pi_out(:,5,:);
Ti_input_name{154}=['CPC_51']; 
Ti_input_name{155}=['CPC_52']; 
Ti_input_name{156}=['CPC_53']; 
Ti_input_name{157}=['CPC_54']; 
Ti_input_name{158}=['CPC_55']; 
Ti_input_name{159}=['CPC_56']; 
Ti_input_name{160}=['CPC_57']; 
Ti_input_name{161}=['CPC_58']; 
Ti_input_name{162}=['CPC_59']; 
Ti1_intup1(:,154:162)=LS1_Pi_out(:,5,:);
Ti1_input_name{154}=['CPC_51'];
Ti1_input_name{155}=['CPC_52'];
Ti1_input_name{156}=['CPC_53']; 
Ti1_input_name{157}=['CPC_54'];
Ti1_input_name{158}=['CPC_55'];
Ti1_input_name{159}=['CPC_56']; 
Ti1_input_name{160}=['CPC_57'];
Ti1_input_name{161}=['CPC_58'];
Ti1_input_name{162}=['CPC_59']; 
Ti_intup1(:,163:171)=LS_Pi_out(:,6,:);
Ti_input_name{163}=['CPC_61']; 
Ti_input_name{164}=['CPC_62']; 
Ti_input_name{165}=['CPC_63']; 
Ti_input_name{166}=['CPC_64']; 
Ti_input_name{167}=['CPC_65']; 
Ti_input_name{168}=['CPC_66']; 
Ti_input_name{169}=['CPC_67']; 
Ti_input_name{170}=['CPC_68']; 
Ti_input_name{171}=['CPC_69']; 
Ti1_intup1(:,163:171)=LS1_Pi_out(:,6,:);
Ti1_input_name{163}=['CPC_61'];
Ti1_input_name{164}=['CPC_62'];
Ti1_input_name{165}=['CPC_63']; 
Ti1_input_name{166}=['CPC_64'];
Ti1_input_name{167}=['CPC_65'];
Ti1_input_name{168}=['CPC_66']; 
Ti1_input_name{169}=['CPC_67'];
Ti1_input_name{170}=['CPC_68'];
Ti1_input_name{171}=['CPC_69']; 
Ti_intup1(:,172:180)=LS_Pi_out(:,7,:);
Ti_input_name{172}=['CPC_71'];
Ti_input_name{173}=['CPC_72'];
Ti_input_name{174}=['CPC_73']; 
Ti_input_name{175}=['CPC_74'];
Ti_input_name{176}=['CPC_75'];
Ti_input_name{177}=['CPC_76']; 
Ti_input_name{178}=['CPC_77'];
Ti_input_name{179}=['CPC_78'];
Ti_input_name{180}=['CPC_79']; 
Ti1_intup1(:,172:180)=LS1_Pi_out(:,7,:);
Ti1_input_name{172}=['CPC_71'];
Ti1_input_name{173}=['CPC_72'];
Ti1_input_name{174}=['CPC_73']; 
Ti1_input_name{175}=['CPC_74'];
Ti1_input_name{176}=['CPC_75'];
Ti1_input_name{177}=['CPC_76']; 
Ti1_input_name{178}=['CPC_77'];
Ti1_input_name{179}=['CPC_78'];
Ti1_input_name{180}=['CPC_79']; 
Ti_intup1(:,181:189)=LS_Pi_out(:,8,:);
Ti_input_name{181}=['CPC_81']; 
Ti_input_name{182}=['CPC_82']; 
Ti_input_name{183}=['CPC_83']; 
Ti_input_name{184}=['CPC_84']; 
Ti_input_name{185}=['CPC_85']; 
Ti_input_name{186}=['CPC_86']; 
Ti_input_name{187}=['CPC_87']; 
Ti_input_name{188}=['CPC_88']; 
Ti_input_name{189}=['CPC_89']; 
Ti1_intup1(:,181:189)=LS1_Pi_out(:,8,:);
Ti1_input_name{181}=['CPC_81'];
Ti1_input_name{182}=['CPC_82'];
Ti1_input_name{183}=['CPC_83']; 
Ti1_input_name{184}=['CPC_84'];
Ti1_input_name{185}=['CPC_85'];
Ti1_input_name{186}=['CPC_86']; 
Ti1_input_name{187}=['CPC_87'];
Ti1_input_name{188}=['CPC_88'];
Ti1_input_name{189}=['CPC_89']; 
Ti_intup1(:,190:198)=LS_Pi_out(:,9,:);
Ti_input_name{190}=['CPC_91']; 
Ti_input_name{191}=['CPC_92']; 
Ti_input_name{192}=['CPC_93']; 
Ti_input_name{193}=['CPC_94']; 
Ti_input_name{194}=['CPC_95']; 
Ti_input_name{195}=['CPC_96']; 
Ti_input_name{196}=['CPC_97']; 
Ti_input_name{197}=['CPC_98']; 
Ti_input_name{198}=['CPC_99']; 
Ti1_intup1(:,190:198)=LS1_Pi_out(:,9,:);
Ti1_input_name{190}=['CPC_91'];
Ti1_input_name{191}=['CPC_92'];
Ti1_input_name{192}=['CPC_93']; 
Ti1_input_name{193}=['CPC_94'];
Ti1_input_name{194}=['CPC_95'];
Ti1_input_name{195}=['CPC_96']; 
Ti1_input_name{196}=['CPC_97'];
Ti1_input_name{197}=['CPC_98'];
Ti1_input_name{198}=['CPC_99']; 
% % %**************************************************************************
Tr_intup1(:,1:9)=LS_TEM(:,7,:);
Tr_input_name{1}=['TEM_1'];
Tr_input_name{2}=['TEM_2'];
Tr_input_name{3}=['TEM_3']; 
Tr_input_name{4}=['TEM_4'];
Tr_input_name{5}=['TEM_5'];
Tr_input_name{6}=['TEM_6']; 
Tr_input_name{7}=['TEM_7'];
Tr_input_name{8}=['TEM_8'];
Tr_input_name{9}=['TEM_9']; 
Tr1_intup1(:,1:9)=LS1_TEM(:,7,:);
Tr1_input_name{1}=['TEM_1'];
Tr1_input_name{2}=['TEM_2'];
Tr1_input_name{3}=['TEM_3'];  
Tr1_input_name{4}=['TEM_4']; 
Tr1_input_name{5}=['TEM_5']; 
Tr1_input_name{6}=['TEM_6']; 
Tr1_input_name{7}=['TEM_7']; 
Tr1_input_name{8}=['TEM_8']; 
Tr1_input_name{9}=['TEM_9']; 
Tr_intup1(:,10:18)=LS_SAt(:,7,:);
Tr_input_name{10}=['SAt_1'];
Tr_input_name{11}=['SAt_2'];
Tr_input_name{12}=['SAt_3']; 
Tr_input_name{13}=['SAt_4'];
Tr_input_name{14}=['SAt_5'];
Tr_input_name{15}=['SAt_6']; 
Tr_input_name{16}=['SAt_7'];
Tr_input_name{17}=['SAt_8'];
Tr_input_name{18}=['SAt_9']; 
Tr1_intup1(:,10:18)=LS1_SAt(:,7,:);
Tr1_input_name{10}=['SAt_1'];
Tr1_input_name{11}=['SAt_2'];
Tr1_input_name{12}=['SAt_3'];
Tr1_input_name{13}=['SAt_4'];
Tr1_input_name{14}=['SAt_5'];
Tr1_input_name{15}=['SAt_6'];
Tr1_input_name{16}=['SAt_7'];
Tr1_input_name{17}=['SAt_8'];
Tr1_input_name{18}=['SAt_9'];
Tr_intup1(:,19:27)=LS_NAt(:,7,:);
Tr_input_name{19}=['NAt_1'];
Tr_input_name{20}=['NAt_2'];
Tr_input_name{21}=['NAt_3']; 
Tr_input_name{22}=['NAt_4'];
Tr_input_name{23}=['NAt_5'];
Tr_input_name{24}=['NAt_6'];
Tr_input_name{25}=['NAt_7'];
Tr_input_name{26}=['NAt_8'];
Tr_input_name{27}=['NAt_9'];
Tr1_intup1(:,19:27)=LS1_NAt(:,7,:);
Tr1_input_name{19}=['NAt_1'];
Tr1_input_name{20}=['NAt_2'];
Tr1_input_name{21}=['NAt_3']; 
Tr1_input_name{22}=['NAt_4'];
Tr1_input_name{23}=['NAt_5'];
Tr1_input_name{24}=['NAt_6']; 
Tr1_input_name{25}=['NAt_7'];
Tr1_input_name{26}=['NAt_8'];
Tr1_input_name{27}=['NAt_9'];  
Tr_intup1(:,28:36)=LS_SPa(:,7,:);
Tr_input_name{28}=['SPa_1'];
Tr_input_name{29}=['SPa_2'];
Tr_input_name{30}=['SPa_3']; 
Tr_input_name{31}=['SPa_4'];
Tr_input_name{32}=['SPa_5'];
Tr_input_name{33}=['SPa_6'];
Tr_input_name{34}=['SPa_7'];
Tr_input_name{35}=['SPa_8'];
Tr_input_name{36}=['SPa_9'];
Tr1_intup1(:,28:36)=LS1_SPa(:,7,:);
Tr1_input_name{28}=['SPa_1'];
Tr1_input_name{29}=['SPa_2'];
Tr1_input_name{30}=['SPa_3'];
Tr1_input_name{31}=['SPa_4'];
Tr1_input_name{32}=['SPa_5'];
Tr1_input_name{33}=['SPa_6'];
Tr1_input_name{34}=['SPa_7'];
Tr1_input_name{35}=['SPa_8'];
Tr1_input_name{36}=['SPa_9'];
Tr_intup1(:,37:45)=LS_Baltic(:,7,:);
Tr_input_name{37}=['Baltic_1'];
Tr_input_name{38}=['Baltic_2'];
Tr_input_name{39}=['Baltic_3']; 
Tr_input_name{40}=['Baltic_4'];
Tr_input_name{41}=['Baltic_5'];
Tr_input_name{42}=['Baltic_6']; 
Tr_input_name{43}=['Baltic_7'];
Tr_input_name{44}=['Baltic_8'];
Tr_input_name{45}=['Baltic_9']; 
Tr1_intup1(:,37:45)=LS1_Baltic(:,7,:);
Tr1_input_name{37}=['Baltic_1'];
Tr1_input_name{38}=['Baltic_2'];
Tr1_input_name{39}=['Baltic_3'];
Tr1_input_name{40}=['Baltic_4'];
Tr1_input_name{41}=['Baltic_5'];
Tr1_input_name{42}=['Baltic_6'];
Tr1_input_name{43}=['Baltic_7'];
Tr1_input_name{44}=['Baltic_8'];
Tr1_input_name{45}=['Baltic_9'];
Tr_intup1(:,46:54)=LS_CPC_M(:,7,:);
Tr_input_name{46}=['CPC_M_1'];
Tr_input_name{47}=['CPC_M_2'];
Tr_input_name{48}=['CPC_M_3']; 
Tr_input_name{49}=['CPC_M_4'];
Tr_input_name{50}=['CPC_M_5'];
Tr_input_name{51}=['CPC_M_6']; 
Tr_input_name{52}=['CPC_M_7'];
Tr_input_name{53}=['CPC_M_8'];
Tr_input_name{54}=['CPC_M_9']; 
Tr1_intup1(:,46:54)=LS1_CPC_M(:,7,:);
Tr1_input_name{46}=['CPC_M_1'];
Tr1_input_name{47}=['CPC_M_2'];
Tr1_input_name{48}=['CPC_M_3'];
Tr1_input_name{49}=['CPC_M_4'];
Tr1_input_name{50}=['CPC_M_5'];
Tr1_input_name{51}=['CPC_M_6'];
Tr1_input_name{52}=['CPC_M_7'];
Tr1_input_name{53}=['CPC_M_8'];
Tr1_input_name{54}=['CPC_M_9'];
Tr_intup1(:,55:63)=LS_Black(:,7,:);
Tr_input_name{55}=['Black_1'];
Tr_input_name{56}=['Black_2'];
Tr_input_name{57}=['Black_3']; 
Tr_input_name{58}=['Black_4'];
Tr_input_name{59}=['Black_5'];
Tr_input_name{60}=['Black_6']; 
Tr_input_name{61}=['Black_7'];
Tr_input_name{62}=['Black_8'];
Tr_input_name{63}=['Black_9']; 
Tr1_intup1(:,55:63)=LS1_Black(:,7,:);
Tr1_input_name{55}=['Black_1'];
Tr1_input_name{56}=['Black_2'];
Tr1_input_name{57}=['Black_3'];
Tr1_input_name{58}=['Black_4'];
Tr1_input_name{59}=['Black_5'];
Tr1_input_name{60}=['Black_6'];
Tr1_input_name{61}=['Black_7'];
Tr1_input_name{62}=['Black_8'];
Tr1_input_name{63}=['Black_9'];
Tr_intup1(:,64:72)=LS_Hudson(:,7,:);
Tr_input_name{64}=['Hudson_1'];
Tr_input_name{65}=['Hudson_2'];
Tr_input_name{66}=['Hudson_3']; 
Tr_input_name{67}=['Hudson_4'];
Tr_input_name{68}=['Hudson_5'];
Tr_input_name{69}=['Hudson_6']; 
Tr_input_name{70}=['Hudson_7'];
Tr_input_name{71}=['Hudson_8'];
Tr_input_name{72}=['Hudson_9']; 
Tr1_intup1(:,64:72)=LS1_Hudson(:,7,:);
Tr1_input_name{64}=['Hudson_1'];
Tr1_input_name{65}=['Hudson_2'];
Tr1_input_name{66}=['Hudson_3'];
Tr1_input_name{67}=['Hudson_4'];
Tr1_input_name{68}=['Hudson_5'];
Tr1_input_name{69}=['Hudson_6'];
Tr1_input_name{70}=['Hudson_7'];
Tr1_input_name{71}=['Hudson_8'];
Tr1_input_name{72}=['Hudson_9'];
Tr_intup1(:,73:81)=LS_Ind(:,7,:);
Tr_input_name{73}=['Ind_1'];
Tr_input_name{74}=['Ind_2'];
Tr_input_name{75}=['Ind_3']; 
Tr_input_name{76}=['Ind_4'];
Tr_input_name{77}=['Ind_5'];
Tr_input_name{78}=['Ind_6']; 
Tr_input_name{79}=['Ind_7'];
Tr_input_name{80}=['Ind_8'];
Tr_input_name{81}=['Ind_9']; 
Tr1_intup1(:,73:81)=LS1_Ind(:,7,:);
Tr1_input_name{73}=['Ind_1'];
Tr1_input_name{74}=['Ind_2'];
Tr1_input_name{75}=['Ind_3'];
Tr1_input_name{76}=['Ind_4'];
Tr1_input_name{77}=['Ind_5'];
Tr1_input_name{78}=['Ind_6'];
Tr1_input_name{79}=['Ind_7'];
Tr1_input_name{80}=['Ind_8'];
Tr1_input_name{81}=['Ind_9'];
Tr_intup1(:,82:90)=LS_Med(:,7,:);
Tr_input_name{82}=['Med_1'];
Tr_input_name{83}=['Med_2'];
Tr_input_name{84}=['Med_3']; 
Tr_input_name{85}=['Med_4'];
Tr_input_name{86}=['Med_5'];
Tr_input_name{87}=['Med_6']; 
Tr_input_name{88}=['Med_7'];
Tr_input_name{89}=['Med_8'];
Tr_input_name{90}=['Med_9']; 
Tr1_intup1(:,82:90)=LS1_Med(:,7,:);
Tr1_input_name{82}=['Med_1'];
Tr1_input_name{83}=['Med_2'];
Tr1_input_name{84}=['Med_3'];
Tr1_input_name{85}=['Med_4'];
Tr1_input_name{86}=['Med_5'];
Tr1_input_name{87}=['Med_6'];
Tr1_input_name{88}=['Med_7'];
Tr1_input_name{89}=['Med_8'];
Tr1_input_name{90}=['Med_9'];
Tr_intup1(:,91:99)=LS_NPa(:,7,:);
Tr_input_name{91}=['NPa_1'];
Tr_input_name{92}=['NPa_2'];
Tr_input_name{93}=['NPa_3']; 
Tr_input_name{94}=['NPa_4'];
Tr_input_name{95}=['NPa_5'];
Tr_input_name{96}=['NPa_6']; 
Tr_input_name{97}=['NPa_7'];
Tr_input_name{98}=['NPa_8'];
Tr_input_name{99}=['NPa_9']; 
Tr1_intup1(:,91:99)=LS1_NPa(:,7,:);
Tr1_input_name{91}=['NPa_1'];
Tr1_input_name{92}=['NPa_2'];
Tr1_input_name{93}=['NPa_3'];
Tr1_input_name{94}=['NPa_4'];
Tr1_input_name{95}=['NPa_5'];
Tr1_input_name{96}=['NPa_6'];
Tr1_input_name{97}=['NPa_7'];
Tr1_input_name{98}=['NPa_8'];
Tr1_input_name{99}=['NPa_9'];
Tr_intup1(:,100:108)=LS_NGB(:,7,:);
Tr_input_name{100}=['NGB_1'];
Tr_input_name{101}=['NGB_2'];
Tr_input_name{102}=['NGB_3']; 
Tr_input_name{103}=['NGB_4'];
Tr_input_name{104}=['NGB_5'];
Tr_input_name{105}=['NGB_6']; 
Tr_input_name{106}=['NGB_7'];
Tr_input_name{107}=['NGB_8'];
Tr_input_name{108}=['NGB_9']; 
Tr1_intup1(:,100:108)=LS1_NGB(:,7,:);
Tr1_input_name{100}=['NGB_1'];
Tr1_input_name{101}=['NGB_2'];
Tr1_input_name{102}=['NGB_3'];
Tr1_input_name{103}=['NGB_4'];
Tr1_input_name{104}=['NGB_5'];
Tr1_input_name{105}=['NGB_6'];
Tr1_input_name{106}=['NGB_7'];
Tr1_input_name{107}=['NGB_8'];
Tr1_input_name{108}=['NGB_9'];
Tr_intup1(:,109:117)=LS_NNAt(:,7,:);
Tr_input_name{109}=['NNAt_1'];
Tr_input_name{110}=['NNAt_2'];
Tr_input_name{111}=['NNAt_3']; 
Tr_input_name{112}=['NNAt_4'];
Tr_input_name{113}=['NNAt_5'];
Tr_input_name{114}=['NNAt_6']; 
Tr_input_name{115}=['NNAt_7']; 
Tr_input_name{116}=['NNAt_8'];
Tr_input_name{117}=['NNAt_9'];
Tr1_intup1(:,109:117)=LS1_NNAt(:,7,:);
Tr1_input_name{109}=['NNAt_1'];
Tr1_input_name{110}=['NNAt_2'];
Tr1_input_name{111}=['NNAt_3'];
Tr1_input_name{112}=['NNAt_4'];
Tr1_input_name{113}=['NNAt_5'];
Tr1_input_name{114}=['NNAt_6'];
Tr1_input_name{115}=['NNAt_7'];
Tr1_input_name{116}=['NNAt_8'];
Tr1_input_name{117}=['NNAt_9'];
Tr_intup1(:,118:126)=LS_P_out(:,1,:);
Tr_input_name{118}=['CPC_11'];
Tr_input_name{119}=['CPC_12'];
Tr_input_name{120}=['CPC_13']; 
Tr_input_name{121}=['CPC_14'];
Tr_input_name{122}=['CPC_15'];
Tr_input_name{123}=['CPC_16']; 
Tr_input_name{124}=['CPC_17'];
Tr_input_name{125}=['CPC_18'];
Tr_input_name{126}=['CPC_19']; 
Tr1_intup1(:,118:126)=LS1_P_out(:,1,:);
Tr1_input_name{118}=['CPC_11'];
Tr1_input_name{119}=['CPC_12'];
Tr1_input_name{120}=['CPC_13']; 
Tr1_input_name{121}=['CPC_14'];
Tr1_input_name{122}=['CPC_15'];
Tr1_input_name{123}=['CPC_16']; 
Tr1_input_name{124}=['CPC_17'];
Tr1_input_name{125}=['CPC_18'];
Tr1_input_name{126}=['CPC_19']; 
Tr_intup1(:,127:135)=LS_P_out(:,2,:);
Tr_input_name{127}=['CPC_21']; 
Tr_input_name{128}=['CPC_22']; 
Tr_input_name{129}=['CPC_23']; 
Tr_input_name{130}=['CPC_24']; 
Tr_input_name{131}=['CPC_25']; 
Tr_input_name{132}=['CPC_26']; 
Tr_input_name{133}=['CPC_27']; 
Tr_input_name{134}=['CPC_28']; 
Tr_input_name{135}=['CPC_29']; 
Tr1_intup1(:,127:135)=LS1_P_out(:,2,:);
Tr1_input_name{127}=['CPC_21'];
Tr1_input_name{128}=['CPC_22'];
Tr1_input_name{129}=['CPC_23']; 
Tr1_input_name{130}=['CPC_24'];
Tr1_input_name{131}=['CPC_25'];
Tr1_input_name{132}=['CPC_26']; 
Tr1_input_name{133}=['CPC_27'];
Tr1_input_name{134}=['CPC_28'];
Tr1_input_name{135}=['CPC_29']; 
Tr_intup1(:,136:144)=LS_P_out(:,3,:);
Tr_input_name{136}=['CPC_31']; 
Tr_input_name{137}=['CPC_32']; 
Tr_input_name{138}=['CPC_33']; 
Tr_input_name{139}=['CPC_34']; 
Tr_input_name{140}=['CPC_35']; 
Tr_input_name{141}=['CPC_36']; 
Tr_input_name{142}=['CPC_37']; 
Tr_input_name{143}=['CPC_38']; 
Tr_input_name{144}=['CPC_39']; 
Tr1_intup1(:,136:144)=LS1_P_out(:,3,:);
Tr1_input_name{136}=['CPC_31'];
Tr1_input_name{137}=['CPC_32'];
Tr1_input_name{138}=['CPC_33']; 
Tr1_input_name{139}=['CPC_34'];
Tr1_input_name{140}=['CPC_35'];
Tr1_input_name{141}=['CPC_36']; 
Tr1_input_name{142}=['CPC_37'];
Tr1_input_name{143}=['CPC_38'];
Tr1_input_name{144}=['CPC_39']; 
Tr_intup1(:,145:153)=LS_P_out(:,4,:);
Tr_input_name{145}=['CPC_41'];
Tr_input_name{146}=['CPC_42'];
Tr_input_name{147}=['CPC_43']; 
Tr_input_name{148}=['CPC_44'];
Tr_input_name{149}=['CPC_45'];
Tr_input_name{150}=['CPC_46']; 
Tr_input_name{151}=['CPC_47'];
Tr_input_name{152}=['CPC_48'];
Tr_input_name{153}=['CPC_49']; 
Tr1_intup1(:,145:153)=LS1_Pi_out(:,4,:);
Tr1_input_name{145}=['CPC_41'];
Tr1_input_name{146}=['CPC_42'];
Tr1_input_name{147}=['CPC_43']; 
Tr1_input_name{148}=['CPC_44'];
Tr1_input_name{149}=['CPC_45'];
Tr1_input_name{150}=['CPC_46']; 
Tr1_input_name{151}=['CPC_47'];
Tr1_input_name{152}=['CPC_48'];
Tr1_input_name{153}=['CPC_49']; 
Tr_intup1(:,154:162)=LS_P_out(:,5,:);
Tr_input_name{154}=['CPC_51']; 
Tr_input_name{155}=['CPC_52']; 
Tr_input_name{156}=['CPC_53']; 
Tr_input_name{157}=['CPC_54']; 
Tr_input_name{158}=['CPC_55']; 
Tr_input_name{159}=['CPC_56']; 
Tr_input_name{160}=['CPC_57']; 
Tr_input_name{161}=['CPC_58']; 
Tr_input_name{162}=['CPC_59']; 
Tr1_intup1(:,154:162)=LS1_P_out(:,5,:);
Tr1_input_name{154}=['CPC_51'];
Tr1_input_name{155}=['CPC_52'];
Tr1_input_name{156}=['CPC_53']; 
Tr1_input_name{157}=['CPC_54'];
Tr1_input_name{158}=['CPC_55'];
Tr1_input_name{159}=['CPC_56']; 
Tr1_input_name{160}=['CPC_57'];
Tr1_input_name{161}=['CPC_58'];
Tr1_input_name{162}=['CPC_59']; 
Tr_intup1(:,163:171)=LS_P_out(:,6,:);
Tr_input_name{163}=['CPC_61']; 
Tr_input_name{164}=['CPC_62']; 
Tr_input_name{165}=['CPC_63']; 
Tr_input_name{166}=['CPC_64']; 
Tr_input_name{167}=['CPC_65']; 
Tr_input_name{168}=['CPC_66']; 
Tr_input_name{169}=['CPC_67']; 
Tr_input_name{170}=['CPC_68']; 
Tr_input_name{171}=['CPC_69']; 
Tr1_intup1(:,163:171)=LS1_P_out(:,6,:);
Tr1_input_name{163}=['CPC_61'];
Tr1_input_name{164}=['CPC_62'];
Tr1_input_name{165}=['CPC_63']; 
Tr1_input_name{166}=['CPC_64'];
Tr1_input_name{167}=['CPC_65'];
Tr1_input_name{168}=['CPC_66']; 
Tr1_input_name{169}=['CPC_67'];
Tr1_input_name{170}=['CPC_68'];
Tr1_input_name{171}=['CPC_69']; 
Tr_intup1(:,172:180)=LS_P_out(:,7,:);
Tr_input_name{172}=['CPC_71'];
Tr_input_name{173}=['CPC_72'];
Tr_input_name{174}=['CPC_73']; 
Tr_input_name{175}=['CPC_74'];
Tr_input_name{176}=['CPC_75'];
Tr_input_name{177}=['CPC_76']; 
Tr_input_name{178}=['CPC_77'];
Tr_input_name{179}=['CPC_78'];
Tr_input_name{180}=['CPC_79']; 
Tr1_intup1(:,172:180)=LS1_P_out(:,7,:);
Tr1_input_name{172}=['CPC_71'];
Tr1_input_name{173}=['CPC_72'];
Tr1_input_name{174}=['CPC_73']; 
Tr1_input_name{175}=['CPC_74'];
Tr1_input_name{176}=['CPC_75'];
Tr1_input_name{177}=['CPC_76']; 
Tr1_input_name{178}=['CPC_77'];
Tr1_input_name{179}=['CPC_78'];
Tr1_input_name{180}=['CPC_79']; 
Tr_intup1(:,181:189)=LS_P_out(:,8,:);
Tr_input_name{181}=['CPC_81']; 
Tr_input_name{182}=['CPC_82']; 
Tr_input_name{183}=['CPC_83']; 
Tr_input_name{184}=['CPC_84']; 
Tr_input_name{185}=['CPC_85']; 
Tr_input_name{186}=['CPC_86']; 
Tr_input_name{187}=['CPC_87']; 
Tr_input_name{188}=['CPC_88']; 
Tr_input_name{189}=['CPC_89']; 
Tr1_intup1(:,181:189)=LS1_P_out(:,8,:);
Tr1_input_name{181}=['CPC_81'];
Tr1_input_name{182}=['CPC_82'];
Tr1_input_name{183}=['CPC_83']; 
Tr1_input_name{184}=['CPC_84'];
Tr1_input_name{185}=['CPC_85'];
Tr1_input_name{186}=['CPC_86']; 
Tr1_input_name{187}=['CPC_87'];
Tr1_input_name{188}=['CPC_88'];
Tr1_input_name{189}=['CPC_89']; 
Tr_intup1(:,190:198)=LS_P_out(:,9,:);
Tr_input_name{190}=['CPC_91']; 
Tr_input_name{191}=['CPC_92']; 
Tr_input_name{192}=['CPC_93']; 
Tr_input_name{193}=['CPC_94']; 
Tr_input_name{194}=['CPC_95']; 
Tr_input_name{195}=['CPC_96']; 
Tr_input_name{196}=['CPC_97']; 
Tr_input_name{197}=['CPC_98']; 
Tr_input_name{198}=['CPC_99']; 
Tr1_intup1(:,190:198)=LS1_P_out(:,9,:);
Tr1_input_name{190}=['CPC_91'];
Tr1_input_name{191}=['CPC_92'];
Tr1_input_name{192}=['CPC_93']; 
Tr1_input_name{193}=['CPC_94'];
Tr1_input_name{194}=['CPC_95'];
Tr1_input_name{195}=['CPC_96']; 
Tr1_input_name{196}=['CPC_97'];
Tr1_input_name{197}=['CPC_98'];
Tr1_input_name{198}=['CPC_99']; 
% % %**************************************************************************
Ts_intup1(:,1:9)=LS_TEM(:,3,:);
Ts_input_name{1}=['TEM_1'];
Ts_input_name{2}=['TEM_2'];
Ts_input_name{3}=['TEM_3']; 
Ts_input_name{4}=['TEM_4'];
Ts_input_name{5}=['TEM_5'];
Ts_input_name{6}=['TEM_6']; 
Ts_input_name{7}=['TEM_7'];
Ts_input_name{8}=['TEM_8'];
Ts_input_name{9}=['TEM_9']; 
Ts1_intup1(:,1:9)=LS1_TEM(:,3,:);
Ts1_input_name{1}=['TEM_1'];
Ts1_input_name{2}=['TEM_2'];
Ts1_input_name{3}=['TEM_3'];  
Ts1_input_name{4}=['TEM_4']; 
Ts1_input_name{5}=['TEM_5']; 
Ts1_input_name{6}=['TEM_6']; 
Ts1_input_name{7}=['TEM_7']; 
Ts1_input_name{8}=['TEM_8']; 
Ts1_input_name{9}=['TEM_9']; 
Ts_intup1(:,10:18)=LS_SAt(:,3,:);
Ts_input_name{10}=['SAt_1'];
Ts_input_name{11}=['SAt_2'];
Ts_input_name{12}=['SAt_3']; 
Ts_input_name{13}=['SAt_4'];
Ts_input_name{14}=['SAt_5'];
Ts_input_name{15}=['SAt_6']; 
Ts_input_name{16}=['SAt_7'];
Ts_input_name{17}=['SAt_8'];
Ts_input_name{18}=['SAt_9']; 
Ts1_intup1(:,10:18)=LS1_SAt(:,3,:);
Ts1_input_name{10}=['SAt_1'];
Ts1_input_name{11}=['SAt_2'];
Ts1_input_name{12}=['SAt_3'];
Ts1_input_name{13}=['SAt_4'];
Ts1_input_name{14}=['SAt_5'];
Ts1_input_name{15}=['SAt_6'];
Ts1_input_name{16}=['SAt_7'];
Ts1_input_name{17}=['SAt_8'];
Ts1_input_name{18}=['SAt_9'];
Ts_intup1(:,19:27)=LS_NAt(:,3,:);
Ts_input_name{19}=['NAt_1'];
Ts_input_name{20}=['NAt_2'];
Ts_input_name{21}=['NAt_3']; 
Ts_input_name{22}=['NAt_4'];
Ts_input_name{23}=['NAt_5'];
Ts_input_name{24}=['NAt_6'];
Ts_input_name{25}=['NAt_7'];
Ts_input_name{26}=['NAt_8'];
Ts_input_name{27}=['NAt_9'];
Ts1_intup1(:,19:27)=LS1_NAt(:,3,:);
Ts1_input_name{19}=['NAt_1'];
Ts1_input_name{20}=['NAt_2'];
Ts1_input_name{21}=['NAt_3']; 
Ts1_input_name{22}=['NAt_4'];
Ts1_input_name{23}=['NAt_5'];
Ts1_input_name{24}=['NAt_6']; 
Ts1_input_name{25}=['NAt_7'];
Ts1_input_name{26}=['NAt_8'];
Ts1_input_name{27}=['NAt_9'];  
Ts_intup1(:,28:36)=LS_SPa(:,3,:);
Ts_input_name{28}=['SPa_1'];
Ts_input_name{29}=['SPa_2'];
Ts_input_name{30}=['SPa_3']; 
Ts_input_name{31}=['SPa_4'];
Ts_input_name{32}=['SPa_5'];
Ts_input_name{33}=['SPa_6'];
Ts_input_name{34}=['SPa_7'];
Ts_input_name{35}=['SPa_8'];
Ts_input_name{36}=['SPa_9'];
Ts1_intup1(:,28:36)=LS1_SPa(:,3,:);
Ts1_input_name{28}=['SPa_1'];
Ts1_input_name{29}=['SPa_2'];
Ts1_input_name{30}=['SPa_3'];
Ts1_input_name{31}=['SPa_4'];
Ts1_input_name{32}=['SPa_5'];
Ts1_input_name{33}=['SPa_6'];
Ts1_input_name{34}=['SPa_7'];
Ts1_input_name{35}=['SPa_8'];
Ts1_input_name{36}=['SPa_9'];
Ts_intup1(:,37:45)=LS_Baltic(:,3,:);
Ts_input_name{37}=['Baltic_1'];
Ts_input_name{38}=['Baltic_2'];
Ts_input_name{39}=['Baltic_3']; 
Ts_input_name{40}=['Baltic_4'];
Ts_input_name{41}=['Baltic_5'];
Ts_input_name{42}=['Baltic_6']; 
Ts_input_name{43}=['Baltic_7'];
Ts_input_name{44}=['Baltic_8'];
Ts_input_name{45}=['Baltic_9']; 
Ts1_intup1(:,37:45)=LS1_Baltic(:,3,:);
Ts1_input_name{37}=['Baltic_1'];
Ts1_input_name{38}=['Baltic_2'];
Ts1_input_name{39}=['Baltic_3'];
Ts1_input_name{40}=['Baltic_4'];
Ts1_input_name{41}=['Baltic_5'];
Ts1_input_name{42}=['Baltic_6'];
Ts1_input_name{43}=['Baltic_7'];
Ts1_input_name{44}=['Baltic_8'];
Ts1_input_name{45}=['Baltic_9'];
Ts_intup1(:,46:54)=LS_CPC_M(:,3,:);
Ts_input_name{46}=['CPC_M_1'];
Ts_input_name{47}=['CPC_M_2'];
Ts_input_name{48}=['CPC_M_3']; 
Ts_input_name{49}=['CPC_M_4'];
Ts_input_name{50}=['CPC_M_5'];
Ts_input_name{51}=['CPC_M_6']; 
Ts_input_name{52}=['CPC_M_7'];
Ts_input_name{53}=['CPC_M_8'];
Ts_input_name{54}=['CPC_M_9']; 
Ts1_intup1(:,46:54)=LS1_CPC_M(:,3,:);
Ts1_input_name{46}=['CPC_M_1'];
Ts1_input_name{47}=['CPC_M_2'];
Ts1_input_name{48}=['CPC_M_3'];
Ts1_input_name{49}=['CPC_M_4'];
Ts1_input_name{50}=['CPC_M_5'];
Ts1_input_name{51}=['CPC_M_6'];
Ts1_input_name{52}=['CPC_M_7'];
Ts1_input_name{53}=['CPC_M_8'];
Ts1_input_name{54}=['CPC_M_9'];
Ts_intup1(:,55:63)=LS_Black(:,3,:);
Ts_input_name{55}=['Black_1'];
Ts_input_name{56}=['Black_2'];
Ts_input_name{57}=['Black_3']; 
Ts_input_name{58}=['Black_4'];
Ts_input_name{59}=['Black_5'];
Ts_input_name{60}=['Black_6']; 
Ts_input_name{61}=['Black_7'];
Ts_input_name{62}=['Black_8'];
Ts_input_name{63}=['Black_9']; 
Ts1_intup1(:,55:63)=LS1_Black(:,3,:);
Ts1_input_name{55}=['Black_1'];
Ts1_input_name{56}=['Black_2'];
Ts1_input_name{57}=['Black_3'];
Ts1_input_name{58}=['Black_4'];
Ts1_input_name{59}=['Black_5'];
Ts1_input_name{60}=['Black_6'];
Ts1_input_name{61}=['Black_7'];
Ts1_input_name{62}=['Black_8'];
Ts1_input_name{63}=['Black_9'];
Ts_intup1(:,64:72)=LS_Hudson(:,3,:);
Ts_input_name{64}=['Hudson_1'];
Ts_input_name{65}=['Hudson_2'];
Ts_input_name{66}=['Hudson_3']; 
Ts_input_name{67}=['Hudson_4'];
Ts_input_name{68}=['Hudson_5'];
Ts_input_name{69}=['Hudson_6']; 
Ts_input_name{70}=['Hudson_7'];
Ts_input_name{71}=['Hudson_8'];
Ts_input_name{72}=['Hudson_9']; 
Ts1_intup1(:,64:72)=LS1_Hudson(:,3,:);
Ts1_input_name{64}=['Hudson_1'];
Ts1_input_name{65}=['Hudson_2'];
Ts1_input_name{66}=['Hudson_3'];
Ts1_input_name{67}=['Hudson_4'];
Ts1_input_name{68}=['Hudson_5'];
Ts1_input_name{69}=['Hudson_6'];
Ts1_input_name{70}=['Hudson_7'];
Ts1_input_name{71}=['Hudson_8'];
Ts1_input_name{72}=['Hudson_9'];
Ts_intup1(:,73:81)=LS_Ind(:,3,:);
Ts_input_name{73}=['Ind_1'];
Ts_input_name{74}=['Ind_2'];
Ts_input_name{75}=['Ind_3']; 
Ts_input_name{76}=['Ind_4'];
Ts_input_name{77}=['Ind_5'];
Ts_input_name{78}=['Ind_6']; 
Ts_input_name{79}=['Ind_7'];
Ts_input_name{80}=['Ind_8'];
Ts_input_name{81}=['Ind_9']; 
Ts1_intup1(:,73:81)=LS1_Ind(:,3,:);
Ts1_input_name{73}=['Ind_1'];
Ts1_input_name{74}=['Ind_2'];
Ts1_input_name{75}=['Ind_3'];
Ts1_input_name{76}=['Ind_4'];
Ts1_input_name{77}=['Ind_5'];
Ts1_input_name{78}=['Ind_6'];
Ts1_input_name{79}=['Ind_7'];
Ts1_input_name{80}=['Ind_8'];
Ts1_input_name{81}=['Ind_9'];
Ts_intup1(:,82:90)=LS_Med(:,3,:);
Ts_input_name{82}=['Med_1'];
Ts_input_name{83}=['Med_2'];
Ts_input_name{84}=['Med_3']; 
Ts_input_name{85}=['Med_4'];
Ts_input_name{86}=['Med_5'];
Ts_input_name{87}=['Med_6']; 
Ts_input_name{88}=['Med_7'];
Ts_input_name{89}=['Med_8'];
Ts_input_name{90}=['Med_9']; 
Ts1_intup1(:,82:90)=LS1_Med(:,3,:);
Ts1_input_name{82}=['Med_1'];
Ts1_input_name{83}=['Med_2'];
Ts1_input_name{84}=['Med_3'];
Ts1_input_name{85}=['Med_4'];
Ts1_input_name{86}=['Med_5'];
Ts1_input_name{87}=['Med_6'];
Ts1_input_name{88}=['Med_7'];
Ts1_input_name{89}=['Med_8'];
Ts1_input_name{90}=['Med_9'];
Ts_intup1(:,91:99)=LS_NPa(:,3,:);
Ts_input_name{91}=['NPa_1'];
Ts_input_name{92}=['NPa_2'];
Ts_input_name{93}=['NPa_3']; 
Ts_input_name{94}=['NPa_4'];
Ts_input_name{95}=['NPa_5'];
Ts_input_name{96}=['NPa_6']; 
Ts_input_name{97}=['NPa_7'];
Ts_input_name{98}=['NPa_8'];
Ts_input_name{99}=['NPa_9']; 
Ts1_intup1(:,91:99)=LS1_NPa(:,3,:);
Ts1_input_name{91}=['NPa_1'];
Ts1_input_name{92}=['NPa_2'];
Ts1_input_name{93}=['NPa_3'];
Ts1_input_name{94}=['NPa_4'];
Ts1_input_name{95}=['NPa_5'];
Ts1_input_name{96}=['NPa_6'];
Ts1_input_name{97}=['NPa_7'];
Ts1_input_name{98}=['NPa_8'];
Ts1_input_name{99}=['NPa_9'];
Ts_intup1(:,100:108)=LS_NGB(:,3,:);
Ts_input_name{100}=['NGB_1'];
Ts_input_name{101}=['NGB_2'];
Ts_input_name{102}=['NGB_3']; 
Ts_input_name{103}=['NGB_4'];
Ts_input_name{104}=['NGB_5'];
Ts_input_name{105}=['NGB_6']; 
Ts_input_name{106}=['NGB_7'];
Ts_input_name{107}=['NGB_8'];
Ts_input_name{108}=['NGB_9']; 
Ts1_intup1(:,100:108)=LS1_NGB(:,3,:);
Ts1_input_name{100}=['NGB_1'];
Ts1_input_name{101}=['NGB_2'];
Ts1_input_name{102}=['NGB_3'];
Ts1_input_name{103}=['NGB_4'];
Ts1_input_name{104}=['NGB_5'];
Ts1_input_name{105}=['NGB_6'];
Ts1_input_name{106}=['NGB_7'];
Ts1_input_name{107}=['NGB_8'];
Ts1_input_name{108}=['NGB_9'];
Ts_intup1(:,109:117)=LS_NNAt(:,3,:);
Ts_input_name{109}=['NNAt_1'];
Ts_input_name{110}=['NNAt_2'];
Ts_input_name{111}=['NNAt_3']; 
Ts_input_name{112}=['NNAt_4'];
Ts_input_name{113}=['NNAt_5'];
Ts_input_name{114}=['NNAt_6']; 
Ts_input_name{115}=['NNAt_7']; 
Ts_input_name{116}=['NNAt_8'];
Ts_input_name{117}=['NNAt_9'];
Ts1_intup1(:,109:117)=LS1_NNAt(:,3,:);
Ts1_input_name{109}=['NNAt_1'];
Ts1_input_name{110}=['NNAt_2'];
Ts1_input_name{111}=['NNAt_3'];
Ts1_input_name{112}=['NNAt_4'];
Ts1_input_name{113}=['NNAt_5'];
Ts1_input_name{114}=['NNAt_6'];
Ts1_input_name{115}=['NNAt_7'];
Ts1_input_name{116}=['NNAt_8'];
Ts1_input_name{117}=['NNAt_9'];
ir=198;
ss=117;
elseif mode==10
Ti_intup1(:,1:10)=LS_TEM(:,6,:);
Ti_input_name{1}=['TEM_1'];
Ti_input_name{2}=['TEM_2'];
Ti_input_name{3}=['TEM_3']; 
Ti_input_name{4}=['TEM_4'];
Ti_input_name{5}=['TEM_5'];
Ti_input_name{6}=['TEM_6']; 
Ti_input_name{7}=['TEM_7'];
Ti_input_name{8}=['TEM_8'];
Ti_input_name{9}=['TEM_9']; 
Ti_input_name{10}=['TEM_0']; 
Ti1_intup1(:,1:10)=LS1_TEM(:,6,:);
Ti1_input_name{1}=['TEM_1'];
Ti1_input_name{2}=['TEM_2'];
Ti1_input_name{3}=['TEM_3'];  
Ti1_input_name{4}=['TEM_4']; 
Ti1_input_name{5}=['TEM_5']; 
Ti1_input_name{6}=['TEM_6']; 
Ti1_input_name{7}=['TEM_7']; 
Ti1_input_name{8}=['TEM_8']; 
Ti1_input_name{9}=['TEM_9']; 
Ti1_input_name{10}=['TEM_0']; 
Ti_intup1(:,11:20)=LS_SAt(:,6,:);
Ti_input_name{11}=['SAt_1'];
Ti_input_name{12}=['SAt_2'];
Ti_input_name{13}=['SAt_3']; 
Ti_input_name{14}=['SAt_4'];
Ti_input_name{15}=['SAt_5'];
Ti_input_name{16}=['SAt_6']; 
Ti_input_name{17}=['SAt_7'];
Ti_input_name{18}=['SAt_8'];
Ti_input_name{19}=['SAt_9']; 
Ti_input_name{20}=['SAt_0'];
Ti1_intup1(:,11:20)=LS1_SAt(:,6,:);
Ti1_input_name{11}=['SAt_1'];
Ti1_input_name{12}=['SAt_2'];
Ti1_input_name{13}=['SAt_3'];
Ti1_input_name{14}=['SAt_4'];
Ti1_input_name{15}=['SAt_5'];
Ti1_input_name{16}=['SAt_6'];
Ti1_input_name{17}=['SAt_7'];
Ti1_input_name{18}=['SAt_8'];
Ti1_input_name{19}=['SAt_9'];
Ti1_input_name{20}=['SAt_0'];
Ti_intup1(:,21:30)=LS_NAt(:,6,:);
Ti_input_name{21}=['NAt_1'];
Ti_input_name{22}=['NAt_2'];
Ti_input_name{23}=['NAt_3']; 
Ti_input_name{24}=['NAt_4'];
Ti_input_name{25}=['NAt_5'];
Ti_input_name{26}=['NAt_6'];
Ti_input_name{27}=['NAt_7'];
Ti_input_name{28}=['NAt_8'];
Ti_input_name{29}=['NAt_9'];
Ti_input_name{30}=['NAt_0'];
Ti1_intup1(:,21:30)=LS1_NAt(:,6,:);
Ti1_input_name{21}=['NAt_1'];
Ti1_input_name{22}=['NAt_2'];
Ti1_input_name{23}=['NAt_3']; 
Ti1_input_name{24}=['NAt_4'];
Ti1_input_name{25}=['NAt_5'];
Ti1_input_name{26}=['NAt_6']; 
Ti1_input_name{27}=['NAt_7'];
Ti1_input_name{28}=['NAt_8'];
Ti1_input_name{29}=['NAt_9'];
Ti1_input_name{30}=['NAt_0'];  
Ti_intup1(:,31:40)=LS_SPa(:,6,:);
Ti_input_name{31}=['SPa_1'];
Ti_input_name{32}=['SPa_2'];
Ti_input_name{33}=['SPa_3']; 
Ti_input_name{34}=['SPa_4'];
Ti_input_name{35}=['SPa_5'];
Ti_input_name{36}=['SPa_6'];
Ti_input_name{37}=['SPa_7'];
Ti_input_name{38}=['SPa_8'];
Ti_input_name{39}=['SPa_9'];
Ti_input_name{40}=['SPa_0'];
Ti1_intup1(:,31:40)=LS1_SPa(:,6,:);
Ti1_input_name{31}=['SPa_1'];
Ti1_input_name{32}=['SPa_2'];
Ti1_input_name{33}=['SPa_3'];
Ti1_input_name{34}=['SPa_4'];
Ti1_input_name{35}=['SPa_5'];
Ti1_input_name{36}=['SPa_6'];
Ti1_input_name{37}=['SPa_7'];
Ti1_input_name{38}=['SPa_8'];
Ti1_input_name{39}=['SPa_9'];
Ti1_input_name{40}=['SPa_0'];
Ti_intup1(:,41:50)=LS_Baltic(:,6,:);
Ti_input_name{41}=['Baltic_1'];
Ti_input_name{42}=['Baltic_2'];
Ti_input_name{43}=['Baltic_3']; 
Ti_input_name{44}=['Baltic_4'];
Ti_input_name{45}=['Baltic_5'];
Ti_input_name{46}=['Baltic_6']; 
Ti_input_name{47}=['Baltic_7'];
Ti_input_name{48}=['Baltic_8'];
Ti_input_name{49}=['Baltic_9']; 
Ti_input_name{50}=['Baltic_0'];
Ti1_intup1(:,41:50)=LS1_Baltic(:,6,:);
Ti1_input_name{41}=['Baltic_1'];
Ti1_input_name{42}=['Baltic_2'];
Ti1_input_name{43}=['Baltic_3'];
Ti1_input_name{44}=['Baltic_4'];
Ti1_input_name{45}=['Baltic_5'];
Ti1_input_name{46}=['Baltic_6'];
Ti1_input_name{47}=['Baltic_7'];
Ti1_input_name{48}=['Baltic_8'];
Ti1_input_name{49}=['Baltic_9'];
Ti1_input_name{50}=['Baltic_0'];
Ti_intup1(:,51:60)=LS_CPC_M(:,6,:);
Ti_input_name{51}=['CPC_M_1'];
Ti_input_name{52}=['CPC_M_2'];
Ti_input_name{53}=['CPC_M_3']; 
Ti_input_name{54}=['CPC_M_4'];
Ti_input_name{55}=['CPC_M_5'];
Ti_input_name{56}=['CPC_M_6']; 
Ti_input_name{57}=['CPC_M_7'];
Ti_input_name{58}=['CPC_M_8'];
Ti_input_name{59}=['CPC_M_9']; 
Ti_input_name{60}=['CPC_M_0'];
Ti1_intup1(:,51:60)=LS1_CPC_M(:,6,:);
Ti1_input_name{51}=['CPC_M_1'];
Ti1_input_name{52}=['CPC_M_2'];
Ti1_input_name{53}=['CPC_M_3'];
Ti1_input_name{54}=['CPC_M_4'];
Ti1_input_name{55}=['CPC_M_5'];
Ti1_input_name{56}=['CPC_M_6'];
Ti1_input_name{57}=['CPC_M_7'];
Ti1_input_name{58}=['CPC_M_8'];
Ti1_input_name{59}=['CPC_M_9'];
Ti1_input_name{60}=['CPC_M_0'];
Ti_intup1(:,61:70)=LS_Black(:,6,:);
Ti_input_name{61}=['Black_1'];
Ti_input_name{62}=['Black_2'];
Ti_input_name{63}=['Black_3']; 
Ti_input_name{64}=['Black_4'];
Ti_input_name{65}=['Black_5'];
Ti_input_name{66}=['Black_6']; 
Ti_input_name{67}=['Black_7'];
Ti_input_name{68}=['Black_8'];
Ti_input_name{69}=['Black_9']; 
Ti_input_name{70}=['Black_0']; 
Ti1_intup1(:,61:70)=LS1_Black(:,6,:);
Ti1_input_name{61}=['Black_1'];
Ti1_input_name{62}=['Black_2'];
Ti1_input_name{63}=['Black_3'];
Ti1_input_name{64}=['Black_4'];
Ti1_input_name{65}=['Black_5'];
Ti1_input_name{66}=['Black_6'];
Ti1_input_name{67}=['Black_7'];
Ti1_input_name{68}=['Black_8'];
Ti1_input_name{69}=['Black_9'];
Ti1_input_name{70}=['Black_0'];
Ti_intup1(:,71:80)=LS_Hudson(:,6,:);
Ti_input_name{71}=['Hudson_1'];
Ti_input_name{72}=['Hudson_2'];
Ti_input_name{73}=['Hudson_3']; 
Ti_input_name{74}=['Hudson_4'];
Ti_input_name{75}=['Hudson_5'];
Ti_input_name{76}=['Hudson_6']; 
Ti_input_name{77}=['Hudson_7'];
Ti_input_name{78}=['Hudson_8'];
Ti_input_name{79}=['Hudson_9']; 
Ti_input_name{80}=['Hudson_0']; 
Ti1_intup1(:,71:80)=LS1_Hudson(:,6,:);
Ti1_input_name{71}=['Hudson_1'];
Ti1_input_name{72}=['Hudson_2'];
Ti1_input_name{73}=['Hudson_3'];
Ti1_input_name{74}=['Hudson_4'];
Ti1_input_name{75}=['Hudson_5'];
Ti1_input_name{76}=['Hudson_6'];
Ti1_input_name{77}=['Hudson_7'];
Ti1_input_name{78}=['Hudson_8'];
Ti1_input_name{79}=['Hudson_9'];
Ti1_input_name{80}=['Hudson_0'];
Ti_intup1(:,81:90)=LS_Ind(:,6,:);
Ti_input_name{81}=['Ind_1'];
Ti_input_name{82}=['Ind_2'];
Ti_input_name{83}=['Ind_3']; 
Ti_input_name{84}=['Ind_4'];
Ti_input_name{85}=['Ind_5'];
Ti_input_name{86}=['Ind_6']; 
Ti_input_name{87}=['Ind_7'];
Ti_input_name{88}=['Ind_8'];
Ti_input_name{89}=['Ind_9']; 
Ti_input_name{90}=['Ind_0']; 
Ti1_intup1(:,81:90)=LS1_Ind(:,6,:);
Ti1_input_name{81}=['Ind_1'];
Ti1_input_name{82}=['Ind_2'];
Ti1_input_name{83}=['Ind_3'];
Ti1_input_name{84}=['Ind_4'];
Ti1_input_name{85}=['Ind_5'];
Ti1_input_name{86}=['Ind_6'];
Ti1_input_name{87}=['Ind_7'];
Ti1_input_name{88}=['Ind_8'];
Ti1_input_name{89}=['Ind_9'];
Ti1_input_name{90}=['Ind_0'];
Ti_intup1(:,91:100)=LS_Med(:,6,:);
Ti_input_name{91}=['Med_1'];
Ti_input_name{92}=['Med_2'];
Ti_input_name{93}=['Med_3']; 
Ti_input_name{94}=['Med_4'];
Ti_input_name{95}=['Med_5'];
Ti_input_name{96}=['Med_6']; 
Ti_input_name{97}=['Med_7'];
Ti_input_name{98}=['Med_8'];
Ti_input_name{99}=['Med_9']; 
Ti_input_name{100}=['Med_0']; 
Ti1_intup1(:,91:100)=LS1_Med(:,6,:);
Ti1_input_name{91}=['Med_1'];
Ti1_input_name{92}=['Med_2'];
Ti1_input_name{93}=['Med_3'];
Ti1_input_name{94}=['Med_4'];
Ti1_input_name{95}=['Med_5'];
Ti1_input_name{96}=['Med_6'];
Ti1_input_name{97}=['Med_7'];
Ti1_input_name{98}=['Med_8'];
Ti1_input_name{99}=['Med_9'];
Ti1_input_name{100}=['Med_0'];
Ti_intup1(:,101:110)=LS_NPa(:,6,:);
Ti_input_name{101}=['NPa_1'];
Ti_input_name{102}=['NPa_2'];
Ti_input_name{103}=['NPa_3']; 
Ti_input_name{104}=['NPa_4'];
Ti_input_name{105}=['NPa_5'];
Ti_input_name{106}=['NPa_6']; 
Ti_input_name{107}=['NPa_7'];
Ti_input_name{108}=['NPa_8'];
Ti_input_name{109}=['NPa_9']; 
Ti_input_name{110}=['NPa_0']; 
Ti1_intup1(:,101:110)=LS1_NPa(:,6,:);
Ti1_input_name{101}=['NPa_1'];
Ti1_input_name{102}=['NPa_2'];
Ti1_input_name{103}=['NPa_3'];
Ti1_input_name{104}=['NPa_4'];
Ti1_input_name{105}=['NPa_5'];
Ti1_input_name{106}=['NPa_6'];
Ti1_input_name{107}=['NPa_7'];
Ti1_input_name{108}=['NPa_8'];
Ti1_input_name{109}=['NPa_9'];
Ti1_input_name{110}=['NPa_0'];
Ti_intup1(:,111:120)=LS_NGB(:,6,:);
Ti_input_name{111}=['NGB_1'];
Ti_input_name{112}=['NGB_2'];
Ti_input_name{113}=['NGB_3']; 
Ti_input_name{114}=['NGB_4'];
Ti_input_name{115}=['NGB_5'];
Ti_input_name{116}=['NGB_6']; 
Ti_input_name{117}=['NGB_7'];
Ti_input_name{118}=['NGB_8'];
Ti_input_name{119}=['NGB_9']; 
Ti_input_name{120}=['NGB_0']; 
Ti1_intup1(:,111:120)=LS1_NGB(:,6,:);
Ti1_input_name{111}=['NGB_1'];
Ti1_input_name{112}=['NGB_2'];
Ti1_input_name{113}=['NGB_3'];
Ti1_input_name{114}=['NGB_4'];
Ti1_input_name{115}=['NGB_5'];
Ti1_input_name{116}=['NGB_6'];
Ti1_input_name{117}=['NGB_7'];
Ti1_input_name{118}=['NGB_8'];
Ti1_input_name{119}=['NGB_9'];
Ti1_input_name{120}=['NGB_0'];
Ti_intup1(:,121:130)=LS_NNAt(:,6,:);
Ti_input_name{121}=['NNAt_1'];
Ti_input_name{122}=['NNAt_2'];
Ti_input_name{123}=['NNAt_3']; 
Ti_input_name{124}=['NNAt_4'];
Ti_input_name{125}=['NNAt_5'];
Ti_input_name{126}=['NNAt_6']; 
Ti_input_name{127}=['NNAt_7']; 
Ti_input_name{128}=['NNAt_8'];
Ti_input_name{129}=['NNAt_9'];
Ti_input_name{130}=['NNAt_0']; 
Ti1_intup1(:,121:130)=LS1_NNAt(:,6,:);
Ti1_input_name{121}=['NNAt_1'];
Ti1_input_name{122}=['NNAt_2'];
Ti1_input_name{123}=['NNAt_3'];
Ti1_input_name{124}=['NNAt_4'];
Ti1_input_name{125}=['NNAt_5'];
Ti1_input_name{126}=['NNAt_6'];
Ti1_input_name{127}=['NNAt_7'];
Ti1_input_name{128}=['NNAt_8'];
Ti1_input_name{129}=['NNAt_9'];
Ti1_input_name{130}=['NNAt_0'];
Ti_intup1(:,131:140)=LS_Pi_out(:,1,:);
Ti_input_name{131}=['CPC_11'];
Ti_input_name{132}=['CPC_12'];
Ti_input_name{133}=['CPC_13']; 
Ti_input_name{134}=['CPC_14'];
Ti_input_name{135}=['CPC_15'];
Ti_input_name{136}=['CPC_16']; 
Ti_input_name{137}=['CPC_17'];
Ti_input_name{138}=['CPC_18'];
Ti_input_name{139}=['CPC_19']; 
Ti_input_name{140}=['CPC_10']; 
Ti1_intup1(:,131:140)=LS1_Pi_out(:,1,:);
Ti1_input_name{131}=['CPC_11'];
Ti1_input_name{132}=['CPC_12'];
Ti1_input_name{133}=['CPC_13']; 
Ti1_input_name{134}=['CPC_14'];
Ti1_input_name{135}=['CPC_15'];
Ti1_input_name{136}=['CPC_16']; 
Ti1_input_name{137}=['CPC_17'];
Ti1_input_name{138}=['CPC_18'];
Ti1_input_name{139}=['CPC_19']; 
Ti1_input_name{140}=['CPC_10']; 
Ti_intup1(:,141:150)=LS_Pi_out(:,2,:);
Ti_input_name{141}=['CPC_21']; 
Ti_input_name{142}=['CPC_22']; 
Ti_input_name{143}=['CPC_23']; 
Ti_input_name{144}=['CPC_24']; 
Ti_input_name{145}=['CPC_25']; 
Ti_input_name{146}=['CPC_26']; 
Ti_input_name{147}=['CPC_27']; 
Ti_input_name{148}=['CPC_28']; 
Ti_input_name{149}=['CPC_29']; 
Ti_input_name{150}=['CPC_20']; 
Ti1_intup1(:,141:150)=LS1_Pi_out(:,2,:);
Ti1_input_name{141}=['CPC_21'];
Ti1_input_name{142}=['CPC_22'];
Ti1_input_name{143}=['CPC_23']; 
Ti1_input_name{144}=['CPC_24'];
Ti1_input_name{145}=['CPC_25'];
Ti1_input_name{146}=['CPC_26']; 
Ti1_input_name{147}=['CPC_27'];
Ti1_input_name{148}=['CPC_28'];
Ti1_input_name{149}=['CPC_29']; 
Ti1_input_name{150}=['CPC_20']; 
Ti_intup1(:,151:160)=LS_Pi_out(:,3,:);
Ti_input_name{151}=['CPC_31']; 
Ti_input_name{152}=['CPC_32']; 
Ti_input_name{153}=['CPC_33']; 
Ti_input_name{154}=['CPC_34']; 
Ti_input_name{155}=['CPC_35']; 
Ti_input_name{156}=['CPC_36']; 
Ti_input_name{157}=['CPC_37']; 
Ti_input_name{158}=['CPC_38']; 
Ti_input_name{159}=['CPC_39']; 
Ti_input_name{160}=['CPC_30']; 
Ti1_intup1(:,151:160)=LS1_Pi_out(:,3,:);
Ti1_input_name{151}=['CPC_31'];
Ti1_input_name{152}=['CPC_32'];
Ti1_input_name{153}=['CPC_33']; 
Ti1_input_name{154}=['CPC_34'];
Ti1_input_name{155}=['CPC_35'];
Ti1_input_name{156}=['CPC_36']; 
Ti1_input_name{157}=['CPC_37'];
Ti1_input_name{158}=['CPC_38'];
Ti1_input_name{159}=['CPC_39']; 
Ti1_input_name{160}=['CPC_30']; 
Ti_intup1(:,161:170)=LS_Pi_out(:,4,:);
Ti_input_name{161}=['CPC_41'];
Ti_input_name{162}=['CPC_42'];
Ti_input_name{163}=['CPC_43']; 
Ti_input_name{164}=['CPC_44'];
Ti_input_name{165}=['CPC_45'];
Ti_input_name{166}=['CPC_46']; 
Ti_input_name{167}=['CPC_47'];
Ti_input_name{168}=['CPC_48'];
Ti_input_name{169}=['CPC_49']; 
Ti_input_name{170}=['CPC_40']; 
Ti1_intup1(:,161:170)=LS1_Pi_out(:,4,:);
Ti1_input_name{161}=['CPC_41'];
Ti1_input_name{162}=['CPC_42'];
Ti1_input_name{163}=['CPC_43']; 
Ti1_input_name{164}=['CPC_44'];
Ti1_input_name{165}=['CPC_45'];
Ti1_input_name{166}=['CPC_46']; 
Ti1_input_name{167}=['CPC_47'];
Ti1_input_name{168}=['CPC_48'];
Ti1_input_name{169}=['CPC_49']; 
Ti1_input_name{170}=['CPC_40']; 
Ti_intup1(:,171:180)=LS_Pi_out(:,5,:);
Ti_input_name{171}=['CPC_51']; 
Ti_input_name{172}=['CPC_52']; 
Ti_input_name{173}=['CPC_53']; 
Ti_input_name{174}=['CPC_54']; 
Ti_input_name{175}=['CPC_55']; 
Ti_input_name{176}=['CPC_56']; 
Ti_input_name{177}=['CPC_57']; 
Ti_input_name{178}=['CPC_58']; 
Ti_input_name{179}=['CPC_59']; 
Ti_input_name{180}=['CPC_50']; 
Ti1_intup1(:,171:180)=LS1_Pi_out(:,5,:);
Ti1_input_name{171}=['CPC_51'];
Ti1_input_name{172}=['CPC_52'];
Ti1_input_name{173}=['CPC_53']; 
Ti1_input_name{174}=['CPC_54'];
Ti1_input_name{175}=['CPC_55'];
Ti1_input_name{176}=['CPC_56']; 
Ti1_input_name{177}=['CPC_57'];
Ti1_input_name{178}=['CPC_58'];
Ti1_input_name{179}=['CPC_59']; 
Ti1_input_name{180}=['CPC_50']; 
Ti_intup1(:,181:190)=LS_Pi_out(:,6,:);
Ti_input_name{181}=['CPC_61']; 
Ti_input_name{182}=['CPC_62']; 
Ti_input_name{183}=['CPC_63']; 
Ti_input_name{184}=['CPC_64']; 
Ti_input_name{185}=['CPC_65']; 
Ti_input_name{186}=['CPC_66']; 
Ti_input_name{187}=['CPC_67']; 
Ti_input_name{188}=['CPC_68']; 
Ti_input_name{189}=['CPC_69']; 
Ti_input_name{190}=['CPC_60']; 
Ti1_intup1(:,181:190)=LS1_Pi_out(:,6,:);
Ti1_input_name{181}=['CPC_61'];
Ti1_input_name{182}=['CPC_62'];
Ti1_input_name{183}=['CPC_63']; 
Ti1_input_name{184}=['CPC_64'];
Ti1_input_name{185}=['CPC_65'];
Ti1_input_name{186}=['CPC_66']; 
Ti1_input_name{187}=['CPC_67'];
Ti1_input_name{188}=['CPC_68'];
Ti1_input_name{189}=['CPC_69']; 
Ti1_input_name{190}=['CPC_60']; 
Ti_intup1(:,191:200)=LS_Pi_out(:,7,:);
Ti_input_name{191}=['CPC_71'];
Ti_input_name{192}=['CPC_72'];
Ti_input_name{193}=['CPC_73']; 
Ti_input_name{194}=['CPC_74'];
Ti_input_name{195}=['CPC_75'];
Ti_input_name{196}=['CPC_76']; 
Ti_input_name{197}=['CPC_77'];
Ti_input_name{198}=['CPC_78'];
Ti_input_name{199}=['CPC_79']; 
Ti_input_name{200}=['CPC_70']; 
Ti1_intup1(:,191:200)=LS1_Pi_out(:,7,:);
Ti1_input_name{191}=['CPC_71'];
Ti1_input_name{192}=['CPC_72'];
Ti1_input_name{193}=['CPC_73']; 
Ti1_input_name{194}=['CPC_74'];
Ti1_input_name{195}=['CPC_75'];
Ti1_input_name{196}=['CPC_76']; 
Ti1_input_name{197}=['CPC_77'];
Ti1_input_name{198}=['CPC_78'];
Ti1_input_name{199}=['CPC_79']; 
Ti1_input_name{200}=['CPC_70']; 
Ti_intup1(:,201:210)=LS_Pi_out(:,8,:);
Ti_input_name{201}=['CPC_81']; 
Ti_input_name{202}=['CPC_82']; 
Ti_input_name{203}=['CPC_83']; 
Ti_input_name{204}=['CPC_84']; 
Ti_input_name{205}=['CPC_85']; 
Ti_input_name{206}=['CPC_86']; 
Ti_input_name{207}=['CPC_87']; 
Ti_input_name{208}=['CPC_88']; 
Ti_input_name{209}=['CPC_89']; 
Ti_input_name{210}=['CPC_80']; 
Ti1_intup1(:,201:210)=LS1_Pi_out(:,8,:);
Ti1_input_name{201}=['CPC_81'];
Ti1_input_name{202}=['CPC_82'];
Ti1_input_name{203}=['CPC_83']; 
Ti1_input_name{204}=['CPC_84'];
Ti1_input_name{205}=['CPC_85'];
Ti1_input_name{206}=['CPC_86']; 
Ti1_input_name{207}=['CPC_87'];
Ti1_input_name{208}=['CPC_88'];
Ti1_input_name{209}=['CPC_89']; 
Ti1_input_name{210}=['CPC_80']; 
Ti_intup1(:,211:220)=LS_Pi_out(:,9,:);
Ti_input_name{211}=['CPC_91']; 
Ti_input_name{212}=['CPC_92']; 
Ti_input_name{213}=['CPC_93']; 
Ti_input_name{214}=['CPC_94']; 
Ti_input_name{215}=['CPC_95']; 
Ti_input_name{216}=['CPC_96']; 
Ti_input_name{217}=['CPC_97']; 
Ti_input_name{218}=['CPC_98']; 
Ti_input_name{219}=['CPC_99']; 
Ti_input_name{220}=['CPC_90']; 
Ti1_intup1(:,211:220)=LS1_Pi_out(:,9,:);
Ti1_input_name{211}=['CPC_91'];
Ti1_input_name{212}=['CPC_92'];
Ti1_input_name{213}=['CPC_93']; 
Ti1_input_name{214}=['CPC_94'];
Ti1_input_name{215}=['CPC_95'];
Ti1_input_name{216}=['CPC_96']; 
Ti1_input_name{217}=['CPC_97'];
Ti1_input_name{218}=['CPC_98'];
Ti1_input_name{219}=['CPC_99']; 
Ti1_input_name{220}=['CPC_90']; 
Ti_intup1(:,221:230)=LS_Pi_out(:,10,:);
Ti_input_name{221}=['CPC_101']; 
Ti_input_name{222}=['CPC_102']; 
Ti_input_name{223}=['CPC_103']; 
Ti_input_name{224}=['CPC_104']; 
Ti_input_name{225}=['CPC_105']; 
Ti_input_name{226}=['CPC_106']; 
Ti_input_name{227}=['CPC_107']; 
Ti_input_name{228}=['CPC_108']; 
Ti_input_name{229}=['CPC_109']; 
Ti_input_name{230}=['CPC_100']; 
Ti1_intup1(:,221:230)=LS1_Pi_out(:,10,:);
Ti1_input_name{221}=['CPC_101'];
Ti1_input_name{222}=['CPC_102'];
Ti1_input_name{223}=['CPC_103']; 
Ti1_input_name{224}=['CPC_104'];
Ti1_input_name{225}=['CPC_105'];
Ti1_input_name{226}=['CPC_106']; 
Ti1_input_name{227}=['CPC_107'];
Ti1_input_name{228}=['CPC_108'];
Ti1_input_name{229}=['CPC_109']; 
Ti1_input_name{230}=['CPC_100']; 
% % %**************************************************************************
Tr_intup1(:,1:10)=LS_TEM(:,7,:);
Tr_input_name{1}=['TEM_1'];
Tr_input_name{2}=['TEM_2'];
Tr_input_name{3}=['TEM_3']; 
Tr_input_name{4}=['TEM_4'];
Tr_input_name{5}=['TEM_5'];
Tr_input_name{6}=['TEM_6']; 
Tr_input_name{7}=['TEM_7'];
Tr_input_name{8}=['TEM_8'];
Tr_input_name{9}=['TEM_9']; 
Tr_input_name{10}=['TEM_0']; 
Tr1_intup1(:,1:10)=LS1_TEM(:,7,:);
Tr1_input_name{1}=['TEM_1'];
Tr1_input_name{2}=['TEM_2'];
Tr1_input_name{3}=['TEM_3'];  
Tr1_input_name{4}=['TEM_4']; 
Tr1_input_name{5}=['TEM_5']; 
Tr1_input_name{6}=['TEM_6']; 
Tr1_input_name{7}=['TEM_7']; 
Tr1_input_name{8}=['TEM_8']; 
Tr1_input_name{9}=['TEM_9']; 
Tr1_input_name{10}=['TEM_0']; 
Tr_intup1(:,11:20)=LS_SAt(:,7,:);
Tr_input_name{11}=['SAt_1'];
Tr_input_name{12}=['SAt_2'];
Tr_input_name{13}=['SAt_3']; 
Tr_input_name{14}=['SAt_4'];
Tr_input_name{15}=['SAt_5'];
Tr_input_name{16}=['SAt_6']; 
Tr_input_name{17}=['SAt_7'];
Tr_input_name{18}=['SAt_8'];
Tr_input_name{19}=['SAt_9']; 
Tr_input_name{20}=['SAt_0'];
Tr1_intup1(:,11:20)=LS1_SAt(:,7,:);
Tr1_input_name{11}=['SAt_1'];
Tr1_input_name{12}=['SAt_2'];
Tr1_input_name{13}=['SAt_3'];
Tr1_input_name{14}=['SAt_4'];
Tr1_input_name{15}=['SAt_5'];
Tr1_input_name{16}=['SAt_6'];
Tr1_input_name{17}=['SAt_7'];
Tr1_input_name{18}=['SAt_8'];
Tr1_input_name{19}=['SAt_9'];
Tr1_input_name{20}=['SAt_0'];
Tr_intup1(:,21:30)=LS_NAt(:,7,:);
Tr_input_name{21}=['NAt_1'];
Tr_input_name{22}=['NAt_2'];
Tr_input_name{23}=['NAt_3']; 
Tr_input_name{24}=['NAt_4'];
Tr_input_name{25}=['NAt_5'];
Tr_input_name{26}=['NAt_6'];
Tr_input_name{27}=['NAt_7'];
Tr_input_name{28}=['NAt_8'];
Tr_input_name{29}=['NAt_9'];
Tr_input_name{30}=['NAt_0'];
Tr1_intup1(:,21:30)=LS1_NAt(:,7,:);
Tr1_input_name{21}=['NAt_1'];
Tr1_input_name{22}=['NAt_2'];
Tr1_input_name{23}=['NAt_3']; 
Tr1_input_name{24}=['NAt_4'];
Tr1_input_name{25}=['NAt_5'];
Tr1_input_name{26}=['NAt_6']; 
Tr1_input_name{27}=['NAt_7'];
Tr1_input_name{28}=['NAt_8'];
Tr1_input_name{29}=['NAt_9'];
Tr1_input_name{30}=['NAt_0'];  
Tr_intup1(:,31:40)=LS_SPa(:,7,:);
Tr_input_name{31}=['SPa_1'];
Tr_input_name{32}=['SPa_2'];
Tr_input_name{33}=['SPa_3']; 
Tr_input_name{34}=['SPa_4'];
Tr_input_name{35}=['SPa_5'];
Tr_input_name{36}=['SPa_6'];
Tr_input_name{37}=['SPa_7'];
Tr_input_name{38}=['SPa_8'];
Tr_input_name{39}=['SPa_9'];
Tr_input_name{40}=['SPa_0'];
Tr1_intup1(:,31:40)=LS1_SPa(:,7,:);
Tr1_input_name{31}=['SPa_1'];
Tr1_input_name{32}=['SPa_2'];
Tr1_input_name{33}=['SPa_3'];
Tr1_input_name{34}=['SPa_4'];
Tr1_input_name{35}=['SPa_5'];
Tr1_input_name{36}=['SPa_6'];
Tr1_input_name{37}=['SPa_7'];
Tr1_input_name{38}=['SPa_8'];
Tr1_input_name{39}=['SPa_9'];
Tr1_input_name{40}=['SPa_0'];
Tr_intup1(:,41:50)=LS_Baltic(:,7,:);
Tr_input_name{41}=['Baltic_1'];
Tr_input_name{42}=['Baltic_2'];
Tr_input_name{43}=['Baltic_3']; 
Tr_input_name{44}=['Baltic_4'];
Tr_input_name{45}=['Baltic_5'];
Tr_input_name{46}=['Baltic_6']; 
Tr_input_name{47}=['Baltic_7'];
Tr_input_name{48}=['Baltic_8'];
Tr_input_name{49}=['Baltic_9']; 
Tr_input_name{50}=['Baltic_0'];
Tr1_intup1(:,41:50)=LS1_Baltic(:,7,:);
Tr1_input_name{41}=['Baltic_1'];
Tr1_input_name{42}=['Baltic_2'];
Tr1_input_name{43}=['Baltic_3'];
Tr1_input_name{44}=['Baltic_4'];
Tr1_input_name{45}=['Baltic_5'];
Tr1_input_name{46}=['Baltic_6'];
Tr1_input_name{47}=['Baltic_7'];
Tr1_input_name{48}=['Baltic_8'];
Tr1_input_name{49}=['Baltic_9'];
Tr1_input_name{50}=['Baltic_0'];
Tr_intup1(:,51:60)=LS_CPC_M(:,7,:);
Tr_input_name{51}=['CPC_M_1'];
Tr_input_name{52}=['CPC_M_2'];
Tr_input_name{53}=['CPC_M_3']; 
Tr_input_name{54}=['CPC_M_4'];
Tr_input_name{55}=['CPC_M_5'];
Tr_input_name{56}=['CPC_M_6']; 
Tr_input_name{57}=['CPC_M_7'];
Tr_input_name{58}=['CPC_M_8'];
Tr_input_name{59}=['CPC_M_9']; 
Tr_input_name{60}=['CPC_M_0'];
Tr1_intup1(:,51:60)=LS1_CPC_M(:,7,:);
Tr1_input_name{51}=['CPC_M_1'];
Tr1_input_name{52}=['CPC_M_2'];
Tr1_input_name{53}=['CPC_M_3'];
Tr1_input_name{54}=['CPC_M_4'];
Tr1_input_name{55}=['CPC_M_5'];
Tr1_input_name{56}=['CPC_M_6'];
Tr1_input_name{57}=['CPC_M_7'];
Tr1_input_name{58}=['CPC_M_8'];
Tr1_input_name{59}=['CPC_M_9'];
Tr1_input_name{60}=['CPC_M_0'];
Tr_intup1(:,61:70)=LS_Black(:,7,:);
Tr_input_name{61}=['Black_1'];
Tr_input_name{62}=['Black_2'];
Tr_input_name{63}=['Black_3']; 
Tr_input_name{64}=['Black_4'];
Tr_input_name{65}=['Black_5'];
Tr_input_name{66}=['Black_6']; 
Tr_input_name{67}=['Black_7'];
Tr_input_name{68}=['Black_8'];
Tr_input_name{69}=['Black_9']; 
Tr_input_name{70}=['Black_0']; 
Tr1_intup1(:,61:70)=LS1_Black(:,7,:);
Tr1_input_name{61}=['Black_1'];
Tr1_input_name{62}=['Black_2'];
Tr1_input_name{63}=['Black_3'];
Tr1_input_name{64}=['Black_4'];
Tr1_input_name{65}=['Black_5'];
Tr1_input_name{66}=['Black_6'];
Tr1_input_name{67}=['Black_7'];
Tr1_input_name{68}=['Black_8'];
Tr1_input_name{69}=['Black_9'];
Tr1_input_name{70}=['Black_0'];
Tr_intup1(:,71:80)=LS_Hudson(:,7,:);
Tr_input_name{71}=['Hudson_1'];
Tr_input_name{72}=['Hudson_2'];
Tr_input_name{73}=['Hudson_3']; 
Tr_input_name{74}=['Hudson_4'];
Tr_input_name{75}=['Hudson_5'];
Tr_input_name{76}=['Hudson_6']; 
Tr_input_name{77}=['Hudson_7'];
Tr_input_name{78}=['Hudson_8'];
Tr_input_name{79}=['Hudson_9']; 
Tr_input_name{80}=['Hudson_0']; 
Tr1_intup1(:,71:80)=LS1_Hudson(:,7,:);
Tr1_input_name{71}=['Hudson_1'];
Tr1_input_name{72}=['Hudson_2'];
Tr1_input_name{73}=['Hudson_3'];
Tr1_input_name{74}=['Hudson_4'];
Tr1_input_name{75}=['Hudson_5'];
Tr1_input_name{76}=['Hudson_6'];
Tr1_input_name{77}=['Hudson_7'];
Tr1_input_name{78}=['Hudson_8'];
Tr1_input_name{79}=['Hudson_9'];
Tr1_input_name{80}=['Hudson_0'];
Tr_intup1(:,81:90)=LS_Ind(:,7,:);
Tr_input_name{81}=['Ind_1'];
Tr_input_name{82}=['Ind_2'];
Tr_input_name{83}=['Ind_3']; 
Tr_input_name{84}=['Ind_4'];
Tr_input_name{85}=['Ind_5'];
Tr_input_name{86}=['Ind_6']; 
Tr_input_name{87}=['Ind_7'];
Tr_input_name{88}=['Ind_8'];
Tr_input_name{89}=['Ind_9']; 
Tr_input_name{90}=['Ind_0']; 
Tr1_intup1(:,81:90)=LS1_Ind(:,7,:);
Tr1_input_name{81}=['Ind_1'];
Tr1_input_name{82}=['Ind_2'];
Tr1_input_name{83}=['Ind_3'];
Tr1_input_name{84}=['Ind_4'];
Tr1_input_name{85}=['Ind_5'];
Tr1_input_name{86}=['Ind_6'];
Tr1_input_name{87}=['Ind_7'];
Tr1_input_name{88}=['Ind_8'];
Tr1_input_name{89}=['Ind_9'];
Tr1_input_name{90}=['Ind_0'];
Tr_intup1(:,91:100)=LS_Med(:,7,:);
Tr_input_name{91}=['Med_1'];
Tr_input_name{92}=['Med_2'];
Tr_input_name{93}=['Med_3']; 
Tr_input_name{94}=['Med_4'];
Tr_input_name{95}=['Med_5'];
Tr_input_name{96}=['Med_6']; 
Tr_input_name{97}=['Med_7'];
Tr_input_name{98}=['Med_8'];
Tr_input_name{99}=['Med_9']; 
Tr_input_name{100}=['Med_0']; 
Tr1_intup1(:,91:100)=LS1_Med(:,7,:);
Tr1_input_name{91}=['Med_1'];
Tr1_input_name{92}=['Med_2'];
Tr1_input_name{93}=['Med_3'];
Tr1_input_name{94}=['Med_4'];
Tr1_input_name{95}=['Med_5'];
Tr1_input_name{96}=['Med_6'];
Tr1_input_name{97}=['Med_7'];
Tr1_input_name{98}=['Med_8'];
Tr1_input_name{99}=['Med_9'];
Tr1_input_name{100}=['Med_0'];
Tr_intup1(:,101:110)=LS_NPa(:,7,:);
Tr_input_name{101}=['NPa_1'];
Tr_input_name{102}=['NPa_2'];
Tr_input_name{103}=['NPa_3']; 
Tr_input_name{104}=['NPa_4'];
Tr_input_name{105}=['NPa_5'];
Tr_input_name{106}=['NPa_6']; 
Tr_input_name{107}=['NPa_7'];
Tr_input_name{108}=['NPa_8'];
Tr_input_name{109}=['NPa_9']; 
Tr_input_name{110}=['NPa_0']; 
Tr1_intup1(:,101:110)=LS1_NPa(:,7,:);
Tr1_input_name{101}=['NPa_1'];
Tr1_input_name{102}=['NPa_2'];
Tr1_input_name{103}=['NPa_3'];
Tr1_input_name{104}=['NPa_4'];
Tr1_input_name{105}=['NPa_5'];
Tr1_input_name{106}=['NPa_6'];
Tr1_input_name{107}=['NPa_7'];
Tr1_input_name{108}=['NPa_8'];
Tr1_input_name{109}=['NPa_9'];
Tr1_input_name{110}=['NPa_0'];
Tr_intup1(:,111:120)=LS_NGB(:,7,:);
Tr_input_name{111}=['NGB_1'];
Tr_input_name{112}=['NGB_2'];
Tr_input_name{113}=['NGB_3']; 
Tr_input_name{114}=['NGB_4'];
Tr_input_name{115}=['NGB_5'];
Tr_input_name{116}=['NGB_6']; 
Tr_input_name{117}=['NGB_7'];
Tr_input_name{118}=['NGB_8'];
Tr_input_name{119}=['NGB_9']; 
Tr_input_name{120}=['NGB_0']; 
Tr1_intup1(:,111:120)=LS1_NGB(:,7,:);
Tr1_input_name{111}=['NGB_1'];
Tr1_input_name{112}=['NGB_2'];
Tr1_input_name{113}=['NGB_3'];
Tr1_input_name{114}=['NGB_4'];
Tr1_input_name{115}=['NGB_5'];
Tr1_input_name{116}=['NGB_6'];
Tr1_input_name{117}=['NGB_7'];
Tr1_input_name{118}=['NGB_8'];
Tr1_input_name{119}=['NGB_9'];
Tr1_input_name{120}=['NGB_0'];
Tr_intup1(:,121:130)=LS_NNAt(:,7,:);
Tr_input_name{121}=['NNAt_1'];
Tr_input_name{122}=['NNAt_2'];
Tr_input_name{123}=['NNAt_3']; 
Tr_input_name{124}=['NNAt_4'];
Tr_input_name{125}=['NNAt_5'];
Tr_input_name{126}=['NNAt_6']; 
Tr_input_name{127}=['NNAt_7']; 
Tr_input_name{128}=['NNAt_8'];
Tr_input_name{129}=['NNAt_9'];
Tr_input_name{130}=['NNAt_0']; 
Tr1_intup1(:,121:130)=LS1_NNAt(:,7,:);
Tr1_input_name{121}=['NNAt_1'];
Tr1_input_name{122}=['NNAt_2'];
Tr1_input_name{123}=['NNAt_3'];
Tr1_input_name{124}=['NNAt_4'];
Tr1_input_name{125}=['NNAt_5'];
Tr1_input_name{126}=['NNAt_6'];
Tr1_input_name{127}=['NNAt_7'];
Tr1_input_name{128}=['NNAt_8'];
Tr1_input_name{129}=['NNAt_9'];
Tr1_input_name{130}=['NNAt_0'];
Tr_intup1(:,131:140)=LS_P_out(:,1,:);
Tr_input_name{131}=['CPC_11'];
Tr_input_name{132}=['CPC_12'];
Tr_input_name{133}=['CPC_13']; 
Tr_input_name{134}=['CPC_14'];
Tr_input_name{135}=['CPC_15'];
Tr_input_name{136}=['CPC_16']; 
Tr_input_name{137}=['CPC_17'];
Tr_input_name{138}=['CPC_18'];
Tr_input_name{139}=['CPC_19']; 
Tr_input_name{140}=['CPC_10']; 
Tr1_intup1(:,131:140)=LS1_P_out(:,1,:);
Tr1_input_name{131}=['CPC_11'];
Tr1_input_name{132}=['CPC_12'];
Tr1_input_name{133}=['CPC_13']; 
Tr1_input_name{134}=['CPC_14'];
Tr1_input_name{135}=['CPC_15'];
Tr1_input_name{136}=['CPC_16']; 
Tr1_input_name{137}=['CPC_17'];
Tr1_input_name{138}=['CPC_18'];
Tr1_input_name{139}=['CPC_19']; 
Tr1_input_name{140}=['CPC_10']; 
Tr_intup1(:,141:150)=LS_P_out(:,2,:);
Tr_input_name{141}=['CPC_21']; 
Tr_input_name{142}=['CPC_22']; 
Tr_input_name{143}=['CPC_23']; 
Tr_input_name{144}=['CPC_24']; 
Tr_input_name{145}=['CPC_25']; 
Tr_input_name{146}=['CPC_26']; 
Tr_input_name{147}=['CPC_27']; 
Tr_input_name{148}=['CPC_28']; 
Tr_input_name{149}=['CPC_29']; 
Tr_input_name{150}=['CPC_20']; 
Tr1_intup1(:,141:150)=LS1_P_out(:,2,:);
Tr1_input_name{141}=['CPC_21'];
Tr1_input_name{142}=['CPC_22'];
Tr1_input_name{143}=['CPC_23']; 
Tr1_input_name{144}=['CPC_24'];
Tr1_input_name{145}=['CPC_25'];
Tr1_input_name{146}=['CPC_26']; 
Tr1_input_name{147}=['CPC_27'];
Tr1_input_name{148}=['CPC_28'];
Tr1_input_name{149}=['CPC_29']; 
Tr1_input_name{150}=['CPC_20']; 
Tr_intup1(:,151:160)=LS_P_out(:,3,:);
Tr_input_name{151}=['CPC_31']; 
Tr_input_name{152}=['CPC_32']; 
Tr_input_name{153}=['CPC_33']; 
Tr_input_name{154}=['CPC_34']; 
Tr_input_name{155}=['CPC_35']; 
Tr_input_name{156}=['CPC_36']; 
Tr_input_name{157}=['CPC_37']; 
Tr_input_name{158}=['CPC_38']; 
Tr_input_name{159}=['CPC_39']; 
Tr_input_name{160}=['CPC_30']; 
Tr1_intup1(:,151:160)=LS1_P_out(:,3,:);
Tr1_input_name{151}=['CPC_31'];
Tr1_input_name{152}=['CPC_32'];
Tr1_input_name{153}=['CPC_33']; 
Tr1_input_name{154}=['CPC_34'];
Tr1_input_name{155}=['CPC_35'];
Tr1_input_name{156}=['CPC_36']; 
Tr1_input_name{157}=['CPC_37'];
Tr1_input_name{158}=['CPC_38'];
Tr1_input_name{159}=['CPC_39']; 
Tr1_input_name{160}=['CPC_30']; 
Tr_intup1(:,161:170)=LS_P_out(:,4,:);
Tr_input_name{161}=['CPC_41'];
Tr_input_name{162}=['CPC_42'];
Tr_input_name{163}=['CPC_43']; 
Tr_input_name{164}=['CPC_44'];
Tr_input_name{165}=['CPC_45'];
Tr_input_name{166}=['CPC_46']; 
Tr_input_name{167}=['CPC_47'];
Tr_input_name{168}=['CPC_48'];
Tr_input_name{169}=['CPC_49']; 
Tr_input_name{170}=['CPC_40']; 
Tr1_intup1(:,161:170)=LS1_P_out(:,4,:);
Tr1_input_name{161}=['CPC_41'];
Tr1_input_name{162}=['CPC_42'];
Tr1_input_name{163}=['CPC_43']; 
Tr1_input_name{164}=['CPC_44'];
Tr1_input_name{165}=['CPC_45'];
Tr1_input_name{166}=['CPC_46']; 
Tr1_input_name{167}=['CPC_47'];
Tr1_input_name{168}=['CPC_48'];
Tr1_input_name{169}=['CPC_49']; 
Tr1_input_name{170}=['CPC_40']; 
Tr_intup1(:,171:180)=LS_P_out(:,5,:);
Tr_input_name{171}=['CPC_51']; 
Tr_input_name{172}=['CPC_52']; 
Tr_input_name{173}=['CPC_53']; 
Tr_input_name{174}=['CPC_54']; 
Tr_input_name{175}=['CPC_55']; 
Tr_input_name{176}=['CPC_56']; 
Tr_input_name{177}=['CPC_57']; 
Tr_input_name{178}=['CPC_58']; 
Tr_input_name{179}=['CPC_59']; 
Tr_input_name{180}=['CPC_50']; 
Tr1_intup1(:,171:180)=LS1_P_out(:,5,:);
Tr1_input_name{171}=['CPC_51'];
Tr1_input_name{172}=['CPC_52'];
Tr1_input_name{173}=['CPC_53']; 
Tr1_input_name{174}=['CPC_54'];
Tr1_input_name{175}=['CPC_55'];
Tr1_input_name{176}=['CPC_56']; 
Tr1_input_name{177}=['CPC_57'];
Tr1_input_name{178}=['CPC_58'];
Tr1_input_name{179}=['CPC_59']; 
Tr1_input_name{180}=['CPC_50']; 
Tr_intup1(:,181:190)=LS_P_out(:,6,:);
Tr_input_name{181}=['CPC_61']; 
Tr_input_name{182}=['CPC_62']; 
Tr_input_name{183}=['CPC_63']; 
Tr_input_name{184}=['CPC_64']; 
Tr_input_name{185}=['CPC_65']; 
Tr_input_name{186}=['CPC_66']; 
Tr_input_name{187}=['CPC_67']; 
Tr_input_name{188}=['CPC_68']; 
Tr_input_name{189}=['CPC_69']; 
Tr_input_name{190}=['CPC_60']; 
Tr1_intup1(:,181:190)=LS1_P_out(:,6,:);
Tr1_input_name{181}=['CPC_61'];
Tr1_input_name{182}=['CPC_62'];
Tr1_input_name{183}=['CPC_63']; 
Tr1_input_name{184}=['CPC_64'];
Tr1_input_name{185}=['CPC_65'];
Tr1_input_name{186}=['CPC_66']; 
Tr1_input_name{187}=['CPC_67'];
Tr1_input_name{188}=['CPC_68'];
Tr1_input_name{189}=['CPC_69']; 
Tr1_input_name{190}=['CPC_60']; 
Tr_intup1(:,191:200)=LS_P_out(:,7,:);
Tr_input_name{191}=['CPC_71'];
Tr_input_name{192}=['CPC_72'];
Tr_input_name{193}=['CPC_73']; 
Tr_input_name{194}=['CPC_74'];
Tr_input_name{195}=['CPC_75'];
Tr_input_name{196}=['CPC_76']; 
Tr_input_name{197}=['CPC_77'];
Tr_input_name{198}=['CPC_78'];
Tr_input_name{199}=['CPC_79']; 
Tr_input_name{200}=['CPC_70']; 
Tr1_intup1(:,191:200)=LS1_P_out(:,7,:);
Tr1_input_name{191}=['CPC_71'];
Tr1_input_name{192}=['CPC_72'];
Tr1_input_name{193}=['CPC_73']; 
Tr1_input_name{194}=['CPC_74'];
Tr1_input_name{195}=['CPC_75'];
Tr1_input_name{196}=['CPC_76']; 
Tr1_input_name{197}=['CPC_77'];
Tr1_input_name{198}=['CPC_78'];
Tr1_input_name{199}=['CPC_79']; 
Tr1_input_name{200}=['CPC_70']; 
Tr_intup1(:,201:210)=LS_P_out(:,8,:);
Tr_input_name{201}=['CPC_81']; 
Tr_input_name{202}=['CPC_82']; 
Tr_input_name{203}=['CPC_83']; 
Tr_input_name{204}=['CPC_84']; 
Tr_input_name{205}=['CPC_85']; 
Tr_input_name{206}=['CPC_86']; 
Tr_input_name{207}=['CPC_87']; 
Tr_input_name{208}=['CPC_88']; 
Tr_input_name{209}=['CPC_89']; 
Tr_input_name{210}=['CPC_80']; 
Tr1_intup1(:,201:210)=LS1_P_out(:,8,:);
Tr1_input_name{201}=['CPC_81'];
Tr1_input_name{202}=['CPC_82'];
Tr1_input_name{203}=['CPC_83']; 
Tr1_input_name{204}=['CPC_84'];
Tr1_input_name{205}=['CPC_85'];
Tr1_input_name{206}=['CPC_86']; 
Tr1_input_name{207}=['CPC_87'];
Tr1_input_name{208}=['CPC_88'];
Tr1_input_name{209}=['CPC_89']; 
Tr1_input_name{210}=['CPC_80']; 
Tr_intup1(:,211:220)=LS_P_out(:,9,:);
Tr_input_name{211}=['CPC_91']; 
Tr_input_name{212}=['CPC_92']; 
Tr_input_name{213}=['CPC_93']; 
Tr_input_name{214}=['CPC_94']; 
Tr_input_name{215}=['CPC_95']; 
Tr_input_name{216}=['CPC_96']; 
Tr_input_name{217}=['CPC_97']; 
Tr_input_name{218}=['CPC_98']; 
Tr_input_name{219}=['CPC_99']; 
Tr_input_name{220}=['CPC_90']; 
Tr1_intup1(:,211:220)=LS1_P_out(:,9,:);
Tr1_input_name{211}=['CPC_91'];
Tr1_input_name{212}=['CPC_92'];
Tr1_input_name{213}=['CPC_93']; 
Tr1_input_name{214}=['CPC_94'];
Tr1_input_name{215}=['CPC_95'];
Tr1_input_name{216}=['CPC_96']; 
Tr1_input_name{217}=['CPC_97'];
Tr1_input_name{218}=['CPC_98'];
Tr1_input_name{219}=['CPC_99']; 
Tr1_input_name{220}=['CPC_90']; 
Tr_intup1(:,221:230)=LS_P_out(:,10,:);
Tr_input_name{221}=['CPC_101']; 
Tr_input_name{222}=['CPC_102']; 
Tr_input_name{223}=['CPC_103']; 
Tr_input_name{224}=['CPC_104']; 
Tr_input_name{225}=['CPC_105']; 
Tr_input_name{226}=['CPC_106']; 
Tr_input_name{227}=['CPC_107']; 
Tr_input_name{228}=['CPC_108']; 
Tr_input_name{229}=['CPC_109']; 
Tr_input_name{230}=['CPC_100']; 
Tr1_intup1(:,221:230)=LS1_P_out(:,10,:);
Tr1_input_name{221}=['CPC_101'];
Tr1_input_name{222}=['CPC_102'];
Tr1_input_name{223}=['CPC_103']; 
Tr1_input_name{224}=['CPC_104'];
Tr1_input_name{225}=['CPC_105'];
Tr1_input_name{226}=['CPC_106']; 
Tr1_input_name{227}=['CPC_107'];
Tr1_input_name{228}=['CPC_108'];
Tr1_input_name{229}=['CPC_109']; 
Tr1_input_name{230}=['CPC_100']; 
% % %**************************************************************************
Ts_intup1(:,1:10)=LS_TEM(:,3,:);
Ts_input_name{1}=['TEM_1'];
Ts_input_name{2}=['TEM_2'];
Ts_input_name{3}=['TEM_3']; 
Ts_input_name{4}=['TEM_4'];
Ts_input_name{5}=['TEM_5'];
Ts_input_name{6}=['TEM_6']; 
Ts_input_name{7}=['TEM_7'];
Ts_input_name{8}=['TEM_8'];
Ts_input_name{9}=['TEM_9']; 
Ts_input_name{10}=['TEM_0']; 
Ts1_intup1(:,1:10)=LS1_TEM(:,3,:);
Ts1_input_name{1}=['TEM_1'];
Ts1_input_name{2}=['TEM_2'];
Ts1_input_name{3}=['TEM_3'];  
Ts1_input_name{4}=['TEM_4']; 
Ts1_input_name{5}=['TEM_5']; 
Ts1_input_name{6}=['TEM_6']; 
Ts1_input_name{7}=['TEM_7']; 
Ts1_input_name{8}=['TEM_8']; 
Ts1_input_name{9}=['TEM_9']; 
Ts1_input_name{10}=['TEM_0']; 
Ts_intup1(:,11:20)=LS_SAt(:,3,:);
Ts_input_name{11}=['SAt_1'];
Ts_input_name{12}=['SAt_2'];
Ts_input_name{13}=['SAt_3']; 
Ts_input_name{14}=['SAt_4'];
Ts_input_name{15}=['SAt_5'];
Ts_input_name{16}=['SAt_6']; 
Ts_input_name{17}=['SAt_7'];
Ts_input_name{18}=['SAt_8'];
Ts_input_name{19}=['SAt_9']; 
Ts_input_name{20}=['SAt_0'];
Ts1_intup1(:,11:20)=LS1_SAt(:,3,:);
Ts1_input_name{11}=['SAt_1'];
Ts1_input_name{12}=['SAt_2'];
Ts1_input_name{13}=['SAt_3'];
Ts1_input_name{14}=['SAt_4'];
Ts1_input_name{15}=['SAt_5'];
Ts1_input_name{16}=['SAt_6'];
Ts1_input_name{17}=['SAt_7'];
Ts1_input_name{18}=['SAt_8'];
Ts1_input_name{19}=['SAt_9'];
Ts1_input_name{20}=['SAt_0'];
Ts_intup1(:,21:30)=LS_NAt(:,3,:);
Ts_input_name{21}=['NAt_1'];
Ts_input_name{22}=['NAt_2'];
Ts_input_name{23}=['NAt_3']; 
Ts_input_name{24}=['NAt_4'];
Ts_input_name{25}=['NAt_5'];
Ts_input_name{26}=['NAt_6'];
Ts_input_name{27}=['NAt_7'];
Ts_input_name{28}=['NAt_8'];
Ts_input_name{29}=['NAt_9'];
Ts_input_name{30}=['NAt_0'];
Ts1_intup1(:,21:30)=LS1_NAt(:,3,:);
Ts1_input_name{21}=['NAt_1'];
Ts1_input_name{22}=['NAt_2'];
Ts1_input_name{23}=['NAt_3']; 
Ts1_input_name{24}=['NAt_4'];
Ts1_input_name{25}=['NAt_5'];
Ts1_input_name{26}=['NAt_6']; 
Ts1_input_name{27}=['NAt_7'];
Ts1_input_name{28}=['NAt_8'];
Ts1_input_name{29}=['NAt_9'];
Ts1_input_name{30}=['NAt_0'];  
Ts_intup1(:,31:40)=LS_SPa(:,3,:);
Ts_input_name{31}=['SPa_1'];
Ts_input_name{32}=['SPa_2'];
Ts_input_name{33}=['SPa_3']; 
Ts_input_name{34}=['SPa_4'];
Ts_input_name{35}=['SPa_5'];
Ts_input_name{36}=['SPa_6'];
Ts_input_name{37}=['SPa_7'];
Ts_input_name{38}=['SPa_8'];
Ts_input_name{39}=['SPa_9'];
Ts_input_name{40}=['SPa_0'];
Ts1_intup1(:,31:40)=LS1_SPa(:,3,:);
Ts1_input_name{31}=['SPa_1'];
Ts1_input_name{32}=['SPa_2'];
Ts1_input_name{33}=['SPa_3'];
Ts1_input_name{34}=['SPa_4'];
Ts1_input_name{35}=['SPa_5'];
Ts1_input_name{36}=['SPa_6'];
Ts1_input_name{37}=['SPa_7'];
Ts1_input_name{38}=['SPa_8'];
Ts1_input_name{39}=['SPa_9'];
Ts1_input_name{40}=['SPa_0'];
Ts_intup1(:,41:50)=LS_Baltic(:,3,:);
Ts_input_name{41}=['Baltic_1'];
Ts_input_name{42}=['Baltic_2'];
Ts_input_name{43}=['Baltic_3']; 
Ts_input_name{44}=['Baltic_4'];
Ts_input_name{45}=['Baltic_5'];
Ts_input_name{46}=['Baltic_6']; 
Ts_input_name{47}=['Baltic_7'];
Ts_input_name{48}=['Baltic_8'];
Ts_input_name{49}=['Baltic_9']; 
Ts_input_name{50}=['Baltic_0'];
Ts1_intup1(:,41:50)=LS1_Baltic(:,3,:);
Ts1_input_name{41}=['Baltic_1'];
Ts1_input_name{42}=['Baltic_2'];
Ts1_input_name{43}=['Baltic_3'];
Ts1_input_name{44}=['Baltic_4'];
Ts1_input_name{45}=['Baltic_5'];
Ts1_input_name{46}=['Baltic_6'];
Ts1_input_name{47}=['Baltic_7'];
Ts1_input_name{48}=['Baltic_8'];
Ts1_input_name{49}=['Baltic_9'];
Ts1_input_name{50}=['Baltic_0'];
Ts_intup1(:,51:60)=LS_CPC_M(:,3,:);
Ts_input_name{51}=['CPC_M_1'];
Ts_input_name{52}=['CPC_M_2'];
Ts_input_name{53}=['CPC_M_3']; 
Ts_input_name{54}=['CPC_M_4'];
Ts_input_name{55}=['CPC_M_5'];
Ts_input_name{56}=['CPC_M_6']; 
Ts_input_name{57}=['CPC_M_7'];
Ts_input_name{58}=['CPC_M_8'];
Ts_input_name{59}=['CPC_M_9']; 
Ts_input_name{60}=['CPC_M_0'];
Ts1_intup1(:,51:60)=LS1_CPC_M(:,3,:);
Ts1_input_name{51}=['CPC_M_1'];
Ts1_input_name{52}=['CPC_M_2'];
Ts1_input_name{53}=['CPC_M_3'];
Ts1_input_name{54}=['CPC_M_4'];
Ts1_input_name{55}=['CPC_M_5'];
Ts1_input_name{56}=['CPC_M_6'];
Ts1_input_name{57}=['CPC_M_7'];
Ts1_input_name{58}=['CPC_M_8'];
Ts1_input_name{59}=['CPC_M_9'];
Ts1_input_name{60}=['CPC_M_0'];
Ts_intup1(:,61:70)=LS_Black(:,3,:);
Ts_input_name{61}=['Black_1'];
Ts_input_name{62}=['Black_2'];
Ts_input_name{63}=['Black_3']; 
Ts_input_name{64}=['Black_4'];
Ts_input_name{65}=['Black_5'];
Ts_input_name{66}=['Black_6']; 
Ts_input_name{67}=['Black_7'];
Ts_input_name{68}=['Black_8'];
Ts_input_name{69}=['Black_9']; 
Ts_input_name{70}=['Black_0']; 
Ts1_intup1(:,61:70)=LS1_Black(:,3,:);
Ts1_input_name{61}=['Black_1'];
Ts1_input_name{62}=['Black_2'];
Ts1_input_name{63}=['Black_3'];
Ts1_input_name{64}=['Black_4'];
Ts1_input_name{65}=['Black_5'];
Ts1_input_name{66}=['Black_6'];
Ts1_input_name{67}=['Black_7'];
Ts1_input_name{68}=['Black_8'];
Ts1_input_name{69}=['Black_9'];
Ts1_input_name{70}=['Black_0'];
Ts_intup1(:,71:80)=LS_Hudson(:,3,:);
Ts_input_name{71}=['Hudson_1'];
Ts_input_name{72}=['Hudson_2'];
Ts_input_name{73}=['Hudson_3']; 
Ts_input_name{74}=['Hudson_4'];
Ts_input_name{75}=['Hudson_5'];
Ts_input_name{76}=['Hudson_6']; 
Ts_input_name{77}=['Hudson_7'];
Ts_input_name{78}=['Hudson_8'];
Ts_input_name{79}=['Hudson_9']; 
Ts_input_name{80}=['Hudson_0']; 
Ts1_intup1(:,71:80)=LS1_Hudson(:,3,:);
Ts1_input_name{71}=['Hudson_1'];
Ts1_input_name{72}=['Hudson_2'];
Ts1_input_name{73}=['Hudson_3'];
Ts1_input_name{74}=['Hudson_4'];
Ts1_input_name{75}=['Hudson_5'];
Ts1_input_name{76}=['Hudson_6'];
Ts1_input_name{77}=['Hudson_7'];
Ts1_input_name{78}=['Hudson_8'];
Ts1_input_name{79}=['Hudson_9'];
Ts1_input_name{80}=['Hudson_0'];
Ts_intup1(:,81:90)=LS_Ind(:,3,:);
Ts_input_name{81}=['Ind_1'];
Ts_input_name{82}=['Ind_2'];
Ts_input_name{83}=['Ind_3']; 
Ts_input_name{84}=['Ind_4'];
Ts_input_name{85}=['Ind_5'];
Ts_input_name{86}=['Ind_6']; 
Ts_input_name{87}=['Ind_7'];
Ts_input_name{88}=['Ind_8'];
Ts_input_name{89}=['Ind_9']; 
Ts_input_name{90}=['Ind_0']; 
Ts1_intup1(:,81:90)=LS1_Ind(:,3,:);
Ts1_input_name{81}=['Ind_1'];
Ts1_input_name{82}=['Ind_2'];
Ts1_input_name{83}=['Ind_3'];
Ts1_input_name{84}=['Ind_4'];
Ts1_input_name{85}=['Ind_5'];
Ts1_input_name{86}=['Ind_6'];
Ts1_input_name{87}=['Ind_7'];
Ts1_input_name{88}=['Ind_8'];
Ts1_input_name{89}=['Ind_9'];
Ts1_input_name{90}=['Ind_0'];
Ts_intup1(:,91:100)=LS_Med(:,3,:);
Ts_input_name{91}=['Med_1'];
Ts_input_name{92}=['Med_2'];
Ts_input_name{93}=['Med_3']; 
Ts_input_name{94}=['Med_4'];
Ts_input_name{95}=['Med_5'];
Ts_input_name{96}=['Med_6']; 
Ts_input_name{97}=['Med_7'];
Ts_input_name{98}=['Med_8'];
Ts_input_name{99}=['Med_9']; 
Ts_input_name{100}=['Med_0']; 
Ts1_intup1(:,91:100)=LS1_Med(:,3,:);
Ts1_input_name{91}=['Med_1'];
Ts1_input_name{92}=['Med_2'];
Ts1_input_name{93}=['Med_3'];
Ts1_input_name{94}=['Med_4'];
Ts1_input_name{95}=['Med_5'];
Ts1_input_name{96}=['Med_6'];
Ts1_input_name{97}=['Med_7'];
Ts1_input_name{98}=['Med_8'];
Ts1_input_name{99}=['Med_9'];
Ts1_input_name{100}=['Med_0'];
Ts_intup1(:,101:110)=LS_NPa(:,3,:);
Ts_input_name{101}=['NPa_1'];
Ts_input_name{102}=['NPa_2'];
Ts_input_name{103}=['NPa_3']; 
Ts_input_name{104}=['NPa_4'];
Ts_input_name{105}=['NPa_5'];
Ts_input_name{106}=['NPa_6']; 
Ts_input_name{107}=['NPa_7'];
Ts_input_name{108}=['NPa_8'];
Ts_input_name{109}=['NPa_9']; 
Ts_input_name{110}=['NPa_0']; 
Ts1_intup1(:,101:110)=LS1_NPa(:,3,:);
Ts1_input_name{101}=['NPa_1'];
Ts1_input_name{102}=['NPa_2'];
Ts1_input_name{103}=['NPa_3'];
Ts1_input_name{104}=['NPa_4'];
Ts1_input_name{105}=['NPa_5'];
Ts1_input_name{106}=['NPa_6'];
Ts1_input_name{107}=['NPa_7'];
Ts1_input_name{108}=['NPa_8'];
Ts1_input_name{109}=['NPa_9'];
Ts1_input_name{110}=['NPa_0'];
Ts_intup1(:,111:120)=LS_NGB(:,3,:);
Ts_input_name{111}=['NGB_1'];
Ts_input_name{112}=['NGB_2'];
Ts_input_name{113}=['NGB_3']; 
Ts_input_name{114}=['NGB_4'];
Ts_input_name{115}=['NGB_5'];
Ts_input_name{116}=['NGB_6']; 
Ts_input_name{117}=['NGB_7'];
Ts_input_name{118}=['NGB_8'];
Ts_input_name{119}=['NGB_9']; 
Ts_input_name{120}=['NGB_0']; 
Ts1_intup1(:,111:120)=LS1_NGB(:,3,:);
Ts1_input_name{111}=['NGB_1'];
Ts1_input_name{112}=['NGB_2'];
Ts1_input_name{113}=['NGB_3'];
Ts1_input_name{114}=['NGB_4'];
Ts1_input_name{115}=['NGB_5'];
Ts1_input_name{116}=['NGB_6'];
Ts1_input_name{117}=['NGB_7'];
Ts1_input_name{118}=['NGB_8'];
Ts1_input_name{119}=['NGB_9'];
Ts1_input_name{120}=['NGB_0'];
Ts_intup1(:,121:130)=LS_NNAt(:,3,:);
Ts_input_name{121}=['NNAt_1'];
Ts_input_name{122}=['NNAt_2'];
Ts_input_name{123}=['NNAt_3']; 
Ts_input_name{124}=['NNAt_4'];
Ts_input_name{125}=['NNAt_5'];
Ts_input_name{126}=['NNAt_6']; 
Ts_input_name{127}=['NNAt_7']; 
Ts_input_name{128}=['NNAt_8'];
Ts_input_name{129}=['NNAt_9'];
Ts_input_name{130}=['NNAt_0']; 
Ts1_intup1(:,121:130)=LS1_NNAt(:,3,:);
Ts1_input_name{121}=['NNAt_1'];
Ts1_input_name{122}=['NNAt_2'];
Ts1_input_name{123}=['NNAt_3'];
Ts1_input_name{124}=['NNAt_4'];
Ts1_input_name{125}=['NNAt_5'];
Ts1_input_name{126}=['NNAt_6'];
Ts1_input_name{127}=['NNAt_7'];
Ts1_input_name{128}=['NNAt_8'];
Ts1_input_name{129}=['NNAt_9'];
Ts1_input_name{130}=['NNAt_0'];
ir=230;
ss=130;
end
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Rank of input data based on the correlations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:mode
    for j=1:ir
    RR=corrcoef(LS_TWS(:,6,i),Ti_intup1(4:186,j));
    Ri_input1(j,i)=RR(1,2);
    RR=corrcoef(LS1_TWS(:,6,i),Ti1_intup1(4:186,j));
    Ri1_input1(j,i)=RR(1,2);
    end
    [U K]=sort(abs(Ri_input1(:,i)));
    [U2 K2]=sort(abs(Ri1_input1(:,i)));
    for j=1:ir
     K1(j,1)=K(ir+1-j,1);
     K3(j,1)=K2(ir+1-j,1);
    end
    Ri_input(:,i)=Ri_input1(K1,i);
    Ti_input(:,:,i)=Ti_intup1(:,K1);
    Ri1_input(:,i)=Ri1_input1(K3,i);
    Ti1_input(:,:,i)=Ti1_intup1(:,K3);
    for j=1:ir
    Ri_input_name{j,i}=Ti_input_name{K1(j)};
    Ri1_input_name{j,i}=Ti1_input_name{K3(j)};
    end
end
% % %**************************************************************************
for i=1:mode
    for j=1:ir
    RR=corrcoef(LS_TWS(:,7,i),Tr_intup1(4:186,j));
    Rr_input1(j,i)=RR(1,2);
    RR=corrcoef(LS1_TWS(:,7,i),Tr1_intup1(4:186,j));
    Rr1_input1(j,i)=RR(1,2);
    end
    [Ur Kr]=sort(abs(Rr_input1(:,i)));
    [Ur2 Kr2]=sort(abs(Rr1_input1(:,i)));
    for j=1:ir
     Kr1(j,1)=Kr(ir+1-j,1);
     Kr3(j,1)=Kr2(ir+1-j,1);
    end
    Rr_input(:,i)=Rr_input1(Kr1,i);
    Tr_input(:,:,i)=Tr_intup1(:,Kr1);
    Rr1_input(:,i)=Rr1_input1(Kr3,i);
    Tr1_input(:,:,i)=Tr1_intup1(:,Kr3);
    for j=1:ir
    Rr_input_name{j,i}=Tr_input_name{Kr1(j)};
    Rr1_input_name{j,i}=Tr1_input_name{Kr3(j)};
    end
end
% %**************************************************************************
for i=1:mode
    for j=1:ss
    RR=corrcoef(LS_TWS(:,3,i),Ts_intup1(4:186,j));
    Rs_input1(j,i)=RR(1,2);
    RR=corrcoef(LS1_TWS(:,3,i),Ts1_intup1(4:186,j));
    Rs1_input1(j,i)=RR(1,2);
    end
    [Us Ks]=sort(abs(Rs_input1(:,i)));
    [Us2 Ks2]=sort(abs(Rs1_input1(:,i)));
    for j=1:ss
     Ks1(j,1)=Ks(ss+1-j,1);
     Ks3(j,1)=Ks2(ss+1-j,1);
    end
    Rs_input(:,i)=Rs_input1(Ks1,i);
    Ts_input(:,:,i)=Ts_intup1(:,Ks1);
    Rs1_input(:,i)=Rs1_input1(Ks3,i);
    Ts1_input(:,:,i)=Ts1_intup1(:,Ks3);
    for j=1:ss
    Rs_input_name{j,i}=Ts_input_name{Ks1(j)};
    Rs1_input_name{j,i}=Ts1_input_name{Ks3(j)};
    end
end

%% %  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Identification of the time lags between the inputs and outputs  
% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tot=183;    %longth of GRACE time series
% %---------------inter------------------------------------------------------
for i=1:mode
    for j=1:ir
        Rii(j,i)=0;
        Rii1(j,i)=0;
for m=-3:3;
    RR=corrcoef(LS_TWS(:,6,i),Ti_input(4+m:186+m,j,i));
    if (abs(Rii(j,i))<abs(RR(1,2)))
        Rii(j,i)=RR(1,2);
        TDi(j,i)=m;
    end
    RR=corrcoef(LS1_TWS(:,6,i),Ti1_input(4+m:186+m,j,i));
    if (abs(Rii1(j,i))<abs(RR(1,2)))
        Rii1(j,i)=RR(1,2);
        TDi1(j,i)=m;
    end 
end
end
end
% %************rank*********************************************************
for i=1:mode
    [U K]=sort(abs(Rii(:,i)));
    [U2 K2]=sort(abs(Rii1(:,i)));
    for j=1:ir
     K1(j,1)=K(ir+1-j,1);
     K3(j,1)=K2(ir+1-j,1);
    end
    Ri_in(:,i)=Rii(K1,i);
    Ti_in(:,:,i)=Ti_input(:,K1,i);
    Ri1_in(:,i)=Rii1(K3,i);
    Ti1_in(:,:,i)=Ti1_input(:,K3,i);
    for j=1:ir
    Ri_in_name{j,i}=Ri_input_name{K1(j),i};
    Ri1_in_name{j,i}=Ri1_input_name{K3(j),i};
    TDi_in(j,i)=TDi(K1(j),i);
    TDi1_in(j,i)=TDi1(K3(j),i);
    end
end
% %---------------seasonal---------------------------------------------------
for i=1:mode
    for j=1:ss
        Rss(j,i)=0;
        Rss1(j,i)=0;
for m=-3:3;
    RR=corrcoef(LS_TWS(:,3,i),Ts_input(4+m:186+m,j,i));
    if (abs(Rss(j,i))<abs(RR(1,2)))
        Rss(j,i)=RR(1,2);
        TDs(j,i)=m;
    end
    RR=corrcoef(LS1_TWS(:,3,i),Ts1_input(4+m:186+m,j,i));
    if (abs(Rss1(j,i))<abs(RR(1,2)))
        Rss1(j,i)=RR(1,2);
        TDs1(j,i)=m;
    end
end
end
end
% %************rank*********************************************************
for i=1:mode
    [U K]=sort(abs(Rss(:,i)));
    [U2 K2]=sort(abs(Rss1(:,i)));
    for j=1:ss
     Ks1(j,1)=K(ss+1-j,1);
     Ks3(j,1)=K2(ss+1-j,1);
    end
    Rs_in(:,i)=Rss(Ks1,i);
    Ts_in(:,:,i)=Ts_input(:,Ks1,i);
    Rs1_in(:,i)=Rss1(Ks3,i);
    Ts1_in(:,:,i)=Ts1_input(:,Ks3,i);
    for j=1:ss
    Rs_in_name{j,i}=Rs_input_name{Ks1(j),i};
    Rs1_in_name{j,i}=Rs1_input_name{Ks3(j),i};
    TDs_in(j,i)=TDs(Ks1(j),i);
    TDs1_in(j,i)=TDs1(Ks3(j),i);
    end
end
% %---------------residual---------------------------------------------------
for i=1:mode
    for j=1:ir
        Rrr(j,i)=0;
        Rrr1(j,i)=0;
for m=-3:3;
    RR=corrcoef(LS_TWS(:,7,i),Tr_input(4+m:186+m,j,i));
    if (abs(Rrr(j,i))<abs(RR(1,2)))
        Rrr(j,i)=RR(1,2);
        TDr(j,i)=m;
    end
    RR=corrcoef(LS1_TWS(:,7,i),Tr1_input(4+m:186+m,j,i));
    if (abs(Rrr1(j,i))<abs(RR(1,2)))
        Rrr1(j,i)=RR(1,2);
        TDr1(j,i)=m;
    end
end
    end
end
% %************rank*********************************************************
for i=1:mode
    [U K]=sort(abs(Rrr(:,i)));
    [U2 K2]=sort(abs(Rrr1(:,i)));
    for j=1:ir
     K1(j,1)=K(ir+1-j,1);
     K3(j,1)=K2(ir+1-j,1);
    end
    Rr_in(:,i)=Rrr(K1,i);
    Tr_in(:,:,i)=Tr_input(:,K1,i);
    Rr1_in(:,i)=Rrr1(K3,i);
    Tr1_in(:,:,i)=Tr1_input(:,K3,i);
    for j=1:ir
    Rr_in_name{j,i}=Rr_input_name{K1(j),i};
    Rr1_in_name{j,i}=Rr1_input_name{K3(j),i};
    TDr_in(j,i)=TDr(K1(j),i);
    TDr1_in(j,i)=TDr1(K3(j),i);
    end
end
%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Prepare the inputs for the model running
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Noting:
% Ys:GRACE seasonal; Yi:GRACE inter annual; Yr:GRACE residual; Yl:GRACE linear trend
% Xs:climate seasonal; Xi:climate inter annual; Xr:climate residual
for i=1:mode
    Ys(:,1,i)=LS_TWS(:,3,i);
    Ys1(:,1,i)=LS1_TWS(:,3,i);
    Xs(:,1,i)=Ts_in(4+TDs_in(1,i):204+TDs_in(1,i),1,i);
    Xs(:,2,i)=Ts_in(4+TDs_in(2,i):204+TDs_in(2,i),2,i);
    Xs(:,3,i)=Ts_in(4+TDs_in(3,i):204+TDs_in(3,i),3,i);
    Xs(:,4,i)=Ts_in(4+TDs_in(4,i):204+TDs_in(4,i),4,i);
    Xs(:,5,i)=Ts_in(4+TDs_in(5,i):204+TDs_in(5,i),5,i);
    Xs(:,6,i)=Ts_in(4+TDs_in(6,i):204+TDs_in(6,i),6,i);
    Xs(:,7,i)=Ts_in(4+TDs_in(7,i):204+TDs_in(7,i),7,i);
    Xs(:,8,i)=Ts_in(4+TDs_in(8,i):204+TDs_in(8,i),8,i);
    Xs(:,9,i)=Ts_in(4+TDs_in(9,i):204+TDs_in(9,i),9,i);
    Xs(:,10,i)=Ts_in(4+TDs_in(10,i):204+TDs_in(10,i),10,i);
    Xs1(:,1,i)=Ts1_in(4+TDs1_in(1,i):204+TDs1_in(1,i),1,i);
    Xs1(:,2,i)=Ts1_in(4+TDs1_in(2,i):204+TDs1_in(2,i),2,i);
    Xs1(:,3,i)=Ts1_in(4+TDs1_in(3,i):204+TDs1_in(3,i),3,i);
    Xs1(:,4,i)=Ts1_in(4+TDs1_in(4,i):204+TDs1_in(4,i),4,i);
    Xs1(:,5,i)=Ts1_in(4+TDs1_in(5,i):204+TDs1_in(5,i),5,i);
    Xs1(:,6,i)=Ts1_in(4+TDs1_in(6,i):204+TDs1_in(6,i),6,i);
    Xs1(:,7,i)=Ts1_in(4+TDs1_in(7,i):204+TDs1_in(7,i),7,i);
    Xs1(:,8,i)=Ts1_in(4+TDs1_in(8,i):204+TDs1_in(8,i),8,i);
    Xs1(:,9,i)=Ts1_in(4+TDs1_in(9,i):204+TDs1_in(9,i),9,i);
    Xs1(:,10,i)=Ts1_in(4+TDs1_in(10,i):204+TDs1_in(10,i),10,i);
end
for i=1:mode
    Yl(:,1,i)=LS_TWS(:,5,i);
    Yl1(:,1,i)=LS1_TWS(:,5,i);
end
% % % %**************************************************************************
for i=1:mode
    Yi(:,1,i)=LS_TWS(:,6,i);
    Yi1(:,1,i)=LS1_TWS(:,6,i);
    Xi(:,1,i)=Ti_in(4+TDi_in(1,i):204+TDi_in(1,i),1,i);
    Xi(:,2,i)=Ti_in(4+TDi_in(2,i):204+TDi_in(2,i),2,i);
    Xi(:,3,i)=Ti_in(4+TDi_in(3,i):204+TDi_in(3,i),3,i);
    Xi(:,4,i)=Ti_in(4+TDi_in(4,i):204+TDi_in(4,i),4,i);
    Xi(:,5,i)=Ti_in(4+TDi_in(5,i):204+TDi_in(5,i),5,i);
    Xi(:,6,i)=Ti_in(4+TDi_in(6,i):204+TDi_in(6,i),6,i);
    Xi(:,7,i)=Ti_in(4+TDi_in(7,i):204+TDi_in(7,i),7,i);
    Xi(:,8,i)=Ti_in(4+TDi_in(8,i):204+TDi_in(8,i),8,i);
    Xi(:,9,i)=Ti_in(4+TDi_in(9,i):204+TDi_in(9,i),9,i);
    Xi(:,10,i)=Ti_in(4+TDi_in(10,i):204+TDi_in(10,i),10,i);
    Xi1(:,1,i)=Ti1_in(4+TDi1_in(1,i):204+TDi1_in(1,i),1,i);
    Xi1(:,2,i)=Ti1_in(4+TDi1_in(2,i):204+TDi1_in(2,i),2,i);
    Xi1(:,3,i)=Ti1_in(4+TDi1_in(3,i):204+TDi1_in(3,i),3,i);
    Xi1(:,4,i)=Ti1_in(4+TDi1_in(4,i):204+TDi1_in(4,i),4,i);
    Xi1(:,5,i)=Ti1_in(4+TDi1_in(5,i):204+TDi1_in(5,i),5,i);
    Xi1(:,6,i)=Ti1_in(4+TDi1_in(6,i):204+TDi1_in(6,i),6,i);
    Xi1(:,7,i)=Ti1_in(4+TDi1_in(7,i):204+TDi1_in(7,i),7,i);
    Xi1(:,8,i)=Ti1_in(4+TDi1_in(8,i):204+TDi1_in(8,i),8,i);
    Xi1(:,9,i)=Ti1_in(4+TDi1_in(9,i):204+TDi1_in(9,i),9,i);
    Xi1(:,10,i)=Ti1_in(4+TDi1_in(10,i):204+TDi1_in(10,i),10,i);
end
for i=1:mode
    Yr(:,1,i)=LS_TWS(:,7,i);
    Yr1(:,1,i)=LS1_TWS(:,7,i);
    Xr(:,1,i)=Tr_in(4+TDr_in(1,i):204+TDr_in(1,i),1,i);
    Xr(:,2,i)=Tr_in(4+TDr_in(2,i):204+TDr_in(2,i),2,i);
    Xr(:,3,i)=Tr_in(4+TDr_in(3,i):204+TDr_in(3,i),3,i);
    Xr(:,4,i)=Tr_in(4+TDr_in(4,i):204+TDr_in(4,i),4,i);
    Xr(:,5,i)=Tr_in(4+TDr_in(5,i):204+TDr_in(5,i),5,i);
    Xr(:,6,i)=Tr_in(4+TDr_in(6,i):204+TDr_in(6,i),6,i);
    Xr(:,7,i)=Tr_in(4+TDr_in(7,i):204+TDr_in(7,i),7,i);
    Xr(:,8,i)=Tr_in(4+TDr_in(8,i):204+TDr_in(8,i),8,i);
    Xr(:,9,i)=Tr_in(4+TDr_in(9,i):204+TDr_in(9,i),9,i);
    Xr(:,10,i)=Tr_in(4+TDr_in(10,i):204+TDr_in(10,i),10,i);
    Xr1(:,1,i)=Tr1_in(4+TDr1_in(1,i):204+TDr1_in(1,i),1,i);
    Xr1(:,2,i)=Tr1_in(4+TDr1_in(2,i):204+TDr1_in(2,i),2,i);
    Xr1(:,3,i)=Tr1_in(4+TDr1_in(3,i):204+TDr1_in(3,i),3,i);
    Xr1(:,4,i)=Tr1_in(4+TDr1_in(4,i):204+TDr1_in(4,i),4,i);
    Xr1(:,5,i)=Tr1_in(4+TDr1_in(5,i):204+TDr1_in(5,i),5,i);
    Xr1(:,6,i)=Tr1_in(4+TDr1_in(6,i):204+TDr1_in(6,i),6,i);
    Xr1(:,7,i)=Tr1_in(4+TDr1_in(7,i):204+TDr1_in(7,i),7,i);
    Xr1(:,8,i)=Tr1_in(4+TDr1_in(8,i):204+TDr1_in(8,i),8,i);
    Xr1(:,9,i)=Tr1_in(4+TDr1_in(9,i):204+TDr1_in(9,i),9,i);
    Xr1(:,10,i)=Tr1_in(4+TDr1_in(10,i):204+TDr1_in(10,i),10,i);
end
%% % %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % % % Run the MLR model
% % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tot=183;
% % 
    for i=1:mode
%-------------------call the MLR model-------------------------------------
    [ALRPredi(:,i)] = multi_regress_pre(Yi(:,:,i),Xi(:,1:3,i));
    [ALRPredr(:,i)] = multi_regress_pre(Yr(:,:,i),Xr(:,1:3,i));
    [ALRPreds(:,i)] = multi_regress_pre(Ys(:,:,i),Xs(:,1:5,i));
    [ALRPredi1(:,i)] = multi_regress_pre(Yi1(:,:,i),Xi1(:,1:3,i));
    [ALRPredr1(:,i)] = multi_regress_pre(Yr1(:,:,i),Xr1(:,1:3,i));
    [ALRPreds1(:,i)] = multi_regress_pre(Ys1(:,:,i),Xs1(:,1:5,i));
%-------------------GRACE trend fitting------------------------------------
     pp1  = polyfit(time1, Yl1(:,1,i), 1);
     Trend1(:,i) = polyval(pp1, time2(4:204));
     pp  = polyfit(time1, Yl(:,1,i), 1);
     Trend(:,i) = polyval(pp, time2(4:204));
%-------------------------prediction of EOF/IC temporal modes----------   
      ALR_T(:,i)               =    ALRPredi(:,i)+ALRPredr(:,i)+ALRPreds(:,i)+Trend(:,i);
      TWS_T(:,i)               =    Yi(:,1,i)+Yr(:,1,i)+Ys(:,1,i)+Yl(:,1,i); 
      ALR_T1(:,i)              =    ALRPredi1(:,i)+ALRPredr1(:,i)+ALRPreds1(:,i)+Trend1(:,i);
      TWS_T1(:,i)              =    Yi1(:,1,i)+Yr1(:,1,i)+Ys1(:,1,i)+Yl1(:,1,i);
    end
%-------------------prediction of TWSC at grid scale-------------------
a1_TWS_ALRPRE(:,:)=S_TWS(:,:)*ALR_T(:,:)';
a1_TWS_M(:,:)=S_TWS(:,:)*TWS_T(:,:)';
a1_TWS_ALRPRE1(:,:)=S1_TWS(:,:)*ALR_T1(:,:)';
a1_TWS_M1(:,:)=S1_TWS(:,:)*TWS_T1(:,:)';
%------------------------error estimation----------------------------------
for i=1:p
ALR_RMS_ALL(i,1)=rms(a1_TWS(i,:)-a1_TWS_ALRPRE(i,1:tot));
RR=corrcoef(a1_TWS(i,:),a1_TWS_ALRPRE(i,1:tot));
ALR_R_ALL(i,1)=RR(1,2);
ALR_RMS_ALL1(i,1)=rms(a1_TWS(i,:)-a1_TWS_ALRPRE1(i,1:tot));
RR=corrcoef(a1_TWS(i,:),a1_TWS_ALRPRE1(i,1:tot));
ALR_R_ALL1(i,1)=RR(1,2);
end
%-------------------prediction of TWSC at basin scale------------------
for i=1:tot
S_T(i,1)=sum(a1_TWS(:,i))/p;
S_TWS_ALRPRE(i,1)=sum(a1_TWS_ALRPRE(:,i))/p;
S1_TWS_ALRPRE(i,1)=sum(a1_TWS_ALRPRE1(:,i))/p;
end
for i=1:201
    a1_TWS_ALR(i,1)=sum(a1_TWS_ALRPRE(:,i))/p;
    a1_TWS_ALR1(i,1)=sum(a1_TWS_ALRPRE1(:,i))/p;
end
%------------------------error estimation----------------------------------
ALRPre_TWS_RMS       =    rms(S_T(:,1)-S_TWS_ALRPRE(:,1));
ALRPre_TWS_RMS1      =    rms(S_T(:,1)-S1_TWS_ALRPRE(:,1));
AVE_ALR=sum(ALR_RMS_ALL(:,1))/p;
AVE_ALR1=sum(ALR_RMS_ALL1(:,1))/p;
% for i=1:p
% RR=corrcoef(a1_TWS_ALRPRE(i,184:201),a1_GLDAS(i,184:201));
% ALRPRE_R(i,1)=RR(1,2);
% RR=corrcoef(a1_TWS_ALRPRE1(i,184:201),a1_GLDAS(i,184:201));
% ALRPRE_R1(i,1)=RR(1,2);
% RR=corrcoef(a1_TWS(i,166:183),a1_GLDAS(i,166:183));
% A_R(i,1)=RR(1,2);
% RR=corrcoef(a1_TWS_ALRPRE1(i,184:201),a1_CPC_S(i,835:852));
% A_CPC_R(i,1)=RR(1,2);
% RR=corrcoef(a1_TWS(i,1:183),a1_CPC_S(i,652:834));
% A_CPC(i,1)=RR(1,2);
% end
% % for i=1:324
% %    a1_GLDAS_TWS(i,1)=sum(a1_GLDAS(:,144+i))/p;
% % end
% %      pp1  = polyfit(time11, Yl1(:,1,i), 1);
% %      Trend1(:,i) = polyval(pp1, time22(:));
%% ------------------------------output------------------------------------
% dlmwrite('/Users/mac/Desktop/Prediction/ICA/data/ama/A_CPC.txt', A_CPC, 'delimiter', '\t','precision','%15.5f')
% dlmwrite('/Users/mac/Desktop/Prediction/ICA/data/ama/A_CPC_R_pre.txt', A_CPC_R, 'delimiter', '\t','precision','%15.5f')
% save(strcat('/Users/mac/Desktop/Prediction/ICA/data/ama/mat/','a1_TWS_ALRPRE1_pre','.mat'),'a1_TWS_ALRPRE1');
% dlmwrite('/Users/mac/Desktop/Prediction/ICA/data/ama/a1_TWS_PRE.txt', a1_TWS_ALR1, 'delimiter', '\t','precision','%15.5f')
% dlmwrite('/Users/mac/Desktop/Prediction/ICA/data/ama/a1_PRE_R.txt', ALRPRE_R1, 'delimiter', '\t','precision','%15.5f')
% dlmwrite('/Users/mac/Desktop/Prediction/ICA/data/ama/a1_SIMU_RMS.txt', ALR_RMS_ALL1, 'delimiter', '\t','precision','%15.5f')
% dlmwrite('/Users/mac/Desktop/Prediction/ICA/data/ama/a1_SIMU_R.txt', ALR_R_ALL1, 'delimiter', '\t','precision','%15.5f')
% dlmwrite('/Users/mac/Desktop/Prediction/ICA/data/ama/a1_GRACE_R_18.txt', A_R, 'delimiter', '\t','precision','%15.5f')
